X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=ucw%2Furl.c;h=4b0ddeaa0be11ee6a9b8d7ddf8269f5922e07ae1;hb=b9db3187d404ffec3840f9a3ffc237fb9523de79;hp=50ed2f7ecd03d840728472d153053b47ab6cdf91;hpb=9245f422a8d36a677bf01db2b5f92c46934b5928;p=libucw.git diff --git a/ucw/url.c b/ucw/url.c index 50ed2f7e..4b0ddeaa 100644 --- a/ucw/url.c +++ b/ucw/url.c @@ -92,12 +92,14 @@ url_deescape(const char *s, char *d) val = NCC_AND; break; case '#': val = NCC_HASH; break; +#ifndef CONFIG_URL_ESCAPE_COMPAT case '$': val = NCC_DOLLAR; break; case '+': val = NCC_PLUS; break; case ',': val = NCC_COMMA; break; +#endif } *d++ = val; s += 3; @@ -137,11 +139,14 @@ url_enescape(const char *s, char *d) if (d >= end) return URL_ERR_TOO_LONG; if (Calnum(c) || /* RFC 2396 (2.1-2.3): Only alphanumerics ... */ - c == '-' || c == '_' || c == '.' || c == '+' || c == '~' || /* ... and several other exceptions ... */ - c == '!' || c == '*' || c == '\'' || c == '(' || c == ')' || - c == '/' || c == '?' || c == ':' || c == '@' || /* ... and reserved chars used for reserved purpose */ - c == '=' || c == '&' || c == '#' || c == ';' || - c == '$' || c == '+' || c == ',') + c == '!' || c == '*' || c == '\'' || c == '(' || c == ')' || /* ... and some exceptions and reserved chars */ + c == '$' || c == '-' || c == '_' || c == '.' || c == '+' || + c == ',' || c == '=' || c == '&' || c == '#' || c == ';' || + c == '/' || c == '?' || c == ':' || c == '@' +#ifndef CONFIG_URL_ESCAPE_COMPAT + || c == '~' +#endif + ) *d++ = *s++; else {