Skip to content
Permalink
Browse files

url: remove javascript URL special case

Fixes: #11485
PR-URL: #12331
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information...
watilde committed Apr 12, 2017
1 parent 2ced07c commit eb0492d51e319eded2f99aa56e1320a498a3a3d5
Showing with 8 additions and 10 deletions.
  1. +0 −2 lib/internal/url.js
  2. +8 −8 test/fixtures/url-setter-tests.js
@@ -556,8 +556,6 @@ Object.defineProperties(URL.prototype, {
const ctx = this[context];
// toUSVString is not needed.
hash = `${hash}`;
if (this.protocol === 'javascript:')
return;
if (!hash) {
ctx.fragment = null;
ctx.flags &= ~binding.URL_FLAGS_HAS_FRAGMENT;
@@ -1800,13 +1800,13 @@ module.exports =
"hash": "#%c3%89t%C3%A9"
}
},
// {
// "href": "javascript:alert(1)",
// "new_value": "castle",
// "expected": {
// "href": "javascript:alert(1)#castle",
// "hash": "#castle"
// }
// }
{
"href": "javascript:alert(1)",
"new_value": "castle",
"expected": {
"href": "javascript:alert(1)#castle",
"hash": "#castle"
}
}
]
}

0 comments on commit eb0492d

Please sign in to comment.
You can’t perform that action at this time.