Bug 1121826 - backout cc192030c28f - brackets shouldn't be automatically escaped in the Query r=mcmanus

This commit is contained in:
Valentin Gosu 2015-01-17 16:13:21 +02:00
parent fa6a467045
commit 945abc4b56
2 changed files with 3 additions and 3 deletions

View File

@ -223,13 +223,13 @@ function test_clearedSpec()
function test_escapeQueryBrackets()
{
var url = stringToURL("http://example.com/?a[x]=1");
do_check_eq(url.spec, "http://example.com/?a%5Bx%5D=1");
do_check_eq(url.spec, "http://example.com/?a[x]=1");
url = stringToURL("http://example.com/?a%5Bx%5D=1");
do_check_eq(url.spec, "http://example.com/?a%5Bx%5D=1");
url = stringToURL("http://[2001::1]/?a[x]=1");
do_check_eq(url.spec, "http://[2001::1]/?a%5Bx%5D=1");
do_check_eq(url.spec, "http://[2001::1]/?a[x]=1");
url = stringToURL("http://[2001::1]/?a%5Bx%5D=1");
do_check_eq(url.spec, "http://[2001::1]/?a%5Bx%5D=1");

View File

@ -363,7 +363,7 @@ static const uint32_t EscapeChars[256] =
0,1023, 0, 512,1023, 0,1023, 0,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, 0, 896, 0, 896,1023, // 5x PQRSTUVWXYZ[\]^_
1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023, 896, 896, 896, 896,1023, // 5x PQRSTUVWXYZ[\]^_
0,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023, // 6x `abcdefghijklmno
1023,1023,1023,1023,1023,1023,1023,1023,1023,1023,1023, 896,1012, 896,1023, 0, // 7x pqrstuvwxyz{|}~ DEL
0 // 80 to FF are zero