Browse Source

MFH: rawurlencode now conforms to rfc 3986 (~ is not encoded) [DOC]

PECL
Rob Richards 18 years ago
parent
commit
5e60f46159
  1. 2
      ext/standard/url.c

2
ext/standard/url.c

@ -569,7 +569,7 @@ PHPAPI char *php_raw_url_encode(char const *s, int len, int *new_length)
if ((str[y] < '0' && str[y] != '-' && str[y] != '.') || if ((str[y] < '0' && str[y] != '-' && str[y] != '.') ||
(str[y] < 'A' && str[y] > '9') || (str[y] < 'A' && str[y] > '9') ||
(str[y] > 'Z' && str[y] < 'a' && str[y] != '_') || (str[y] > 'Z' && str[y] < 'a' && str[y] != '_') ||
(str[y] > 'z')) {
(str[y] > 'z' && str[y] != '~')) {
str[y++] = '%'; str[y++] = '%';
str[y++] = hexchars[(unsigned char) s[x] >> 4]; str[y++] = hexchars[(unsigned char) s[x] >> 4];
str[y] = hexchars[(unsigned char) s[x] & 15]; str[y] = hexchars[(unsigned char) s[x] & 15];

Loading…
Cancel
Save