diff options
author | New Tobin Paradigm <email@mattatobin.com> | 2018-04-15 19:52:56 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-15 19:52:56 -0400 |
commit | 53bd9f7e59a4f0ef710bb5a6525840c5dc7d8416 (patch) | |
tree | d31e63f2fa42dcea7b240cc4f6c3f6f1966db8f6 /netwerk | |
parent | 7ae62c29818d9562d376315c65cf9f55266728c3 (diff) | |
parent | 2c0b407f04e850b45c912917026e4945ec0dc2f5 (diff) | |
download | uxp-53bd9f7e59a4f0ef710bb5a6525840c5dc7d8416.tar.gz |
Merge pull request #171 from janekptacijarabaci/js_location_hash_1
Fix: no escape single quote in location.hash
Diffstat (limited to 'netwerk')
-rw-r--r-- | netwerk/test/unit/test_standardurl.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/netwerk/test/unit/test_standardurl.js b/netwerk/test/unit/test_standardurl.js index c4d44f41ff..476c34b70b 100644 --- a/netwerk/test/unit/test_standardurl.js +++ b/netwerk/test/unit/test_standardurl.js @@ -251,6 +251,17 @@ add_test(function test_escapeBrackets() run_next_test(); }); +add_test(function test_escapeQuote() +{ + var url = stringToURL("http://example.com/#'"); + do_check_eq(url.spec, "http://example.com/#'"); + do_check_eq(url.ref, "'"); + url.ref = "test'test"; + do_check_eq(url.spec, "http://example.com/#test'test"); + do_check_eq(url.ref, "test'test"); + run_next_test(); +}); + add_test(function test_apostropheEncoding() { // For now, single quote is escaped everywhere _except_ the path. |