We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a27f63 commit ffb2ef4Copy full SHA for ffb2ef4
2 files changed
lib/internal/url.js
@@ -556,8 +556,6 @@ Object.defineProperties(URL.prototype, {
556
const ctx = this[context];
557
// toUSVString is not needed.
558
hash = `${hash}`;
559
- if (this.protocol === 'javascript:')
560
- return;
561
if (!hash) {
562
ctx.fragment = null;
563
ctx.flags &= ~binding.URL_FLAGS_HAS_FRAGMENT;
test/fixtures/url-setter-tests.js
@@ -1800,13 +1800,13 @@ module.exports =
1800
"hash": "#%c3%89t%C3%A9"
1801
}
1802
},
1803
- // {
1804
- // "href": "javascript:alert(1)",
1805
- // "new_value": "castle",
1806
- // "expected": {
1807
- // "href": "javascript:alert(1)#castle",
1808
- // "hash": "#castle"
1809
- // }
1810
+ {
+ "href": "javascript:alert(1)",
+ "new_value": "castle",
+ "expected": {
+ "href": "javascript:alert(1)#castle",
+ "hash": "#castle"
+ }
1811
]
1812
0 commit comments