提交 a7968d5c 编写于 作者: J Johannes Rieken

fix #49628

上级 673bf004
...@@ -565,7 +565,7 @@ function _asFormatted(uri: URI, skipEncoding: boolean): string { ...@@ -565,7 +565,7 @@ function _asFormatted(uri: URI, skipEncoding: boolean): string {
} }
if (fragment) { if (fragment) {
res += '#'; res += '#';
res += encoder(fragment, false); res += !skipEncoding ? encodeURIComponentFast(fragment, false) : fragment;
} }
return res; return res;
} }
...@@ -451,6 +451,16 @@ suite('URI', () => { ...@@ -451,6 +451,16 @@ suite('URI', () => {
assert.equal(fileUri2.authority, ''); assert.equal(fileUri2.authority, '');
}); });
test('Ctrl click to follow hash query param url gets urlencoded #49628', function () {
let input = 'http://localhost:3000/#/foo?bar=baz';
let uri = URI.parse(input);
assert.equal(uri.toString(true), input);
input = 'http://localhost:3000/foo?bar=baz';
uri = URI.parse(input);
assert.equal(uri.toString(true), input);
});
test('URI - (de)serialize', function () { test('URI - (de)serialize', function () {
var values = [ var values = [
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册