Commit d2dd502e authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Plus sign must not be decoded in URI

This is different from HTTP forms.
parent 04b436b8
...@@ -95,9 +95,6 @@ int main (void) ...@@ -95,9 +95,6 @@ int main (void)
test_decode ("this_should_not_be_modified_1234", test_decode ("this_should_not_be_modified_1234",
"this_should_not_be_modified_1234"); "this_should_not_be_modified_1234");
test_decode ("This+should+be+modified+1234!",
"This should be modified 1234!");
test_decode ("This%20should%20be%20modified%201234!", test_decode ("This%20should%20be%20modified%201234!",
"This should be modified 1234!"); "This should be modified 1234!");
...@@ -109,7 +106,7 @@ int main (void) ...@@ -109,7 +106,7 @@ int main (void)
test_decode ("%0000", ""); test_decode ("%0000", "");
/* Non-ASCII tests */ /* Non-ASCII tests */
test_decode ("T%C3%a9l%c3%A9vision+%e2%82%Ac", "Télévision €"); test_decode ("T%C3%a9l%c3%A9vision %e2%82%Ac", "Télévision €");
test_decode ("T%E9l%E9vision", "T\xe9l\xe9vision"); test_decode ("T%E9l%E9vision", "T\xe9l\xe9vision");
/* Base 64 tests */ /* Base 64 tests */
......
...@@ -95,10 +95,6 @@ char *decode_URI( char *psz ) ...@@ -95,10 +95,6 @@ char *decode_URI( char *psz )
break; break;
} }
case '+': /* This is HTTP forms, not URI decoding... */
*out++ = ' ';
break;
default: default:
/* Inserting non-ASCII or non-printable characters is unsafe, /* Inserting non-ASCII or non-printable characters is unsafe,
* and no sane browser will send these unencoded */ * and no sane browser will send these unencoded */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment