From 2c0b407f04e850b45c912917026e4945ec0dc2f5 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Mon, 12 Feb 2018 19:40:38 +0100 Subject: JS - location.hash - no escape single quote --- netwerk/test/unit/test_standardurl.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'netwerk') diff --git a/netwerk/test/unit/test_standardurl.js b/netwerk/test/unit/test_standardurl.js index c4d44f41f..476c34b70 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. -- cgit v1.2.3