From: Florian Forster Date: Wed, 28 Jul 2010 16:17:09 +0000 (+0200) Subject: src/utils_cgi.c: Import a list of reserved characters from RFC 3986. X-Git-Tag: v4.0.0~59 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=551bbc6b3aaa1c7adfc513a31e9abee13aeb36d5;p=collection4.git src/utils_cgi.c: Import a list of reserved characters from RFC 3986. --- diff --git a/src/utils_cgi.c b/src/utils_cgi.c index 7851914..475e14e 100644 --- a/src/utils_cgi.c +++ b/src/utils_cgi.c @@ -433,10 +433,16 @@ char *uri_escape_copy (char *dest, const char *src, size_t n) /* {{{ */ } else if ((((unsigned char) src[in]) < 32) || (src[in] == ' ') - || (src[in] == '&') - || (src[in] == ';') - || (src[in] == '?') - || (src[in] == '/') + /* RFC 3986, gen-delims */ + || (src[in] == ':') || (src[in] == '/') || (src[in] == '?') + || (src[in] == '#') || (src[in] == '[') || (src[in] == ']') + || (src[in] == '@') + /* RFC 3986, sub-delims */ + || (src[in] == '!') || (src[in] == '$') || (src[in] == '&') + || (src[in] == '(') || (src[in] == ')') || (src[in] == '*') + || (src[in] == '+') || (src[in] == ',') || (src[in] == ';') + || (src[in] == '=') || (src[in] == '\'') + /* 8-bit data */ || (((unsigned char) src[in]) >= 128)) { char esc[4];