mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 08:18:41 +09:00
JS - location.hash - no escape single quote
This commit is contained in:
parent
8cd7bad738
commit
637540d66e
2 changed files with 12 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@ static const uint32_t EscapeChars[256] =
|
|||
{
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
||||
0,1023, 0, 512,1023, 0,1023, 112,1023,1023,1023,1023,1023,1023, 953, 784, // 2x !"#$%&'()*+,-./
|
||||
0,1023, 0, 512,1023, 0,1023, 624,1023,1023,1023,1023,1023,1023, 953, 784, // 2x !"#$%&'()*+,-./
|
||||
1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1008,1008, 0,1008, 0, 768, // 3x 0123456789:;<=>?
|
||||
1008,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023, // 4x @ABCDEFGHIJKLMNO
|
||||
1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1008, 896,1008, 896,1023, // 5x PQRSTUVWXYZ[\]^_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue