[project @ 2004-04-13 23:21:03 by bursa]

Make scheme matching stricter.

svn path=/import/netsurf/; revision=779
This commit is contained in:
James Bursa 2004-04-13 23:21:03 +00:00
parent 5e41f0465c
commit 0bb2a027d6

View File

@ -32,8 +32,8 @@ regex_t url_re, url_up_re, url_nice_re;
void url_init(void)
{
/* regex from RFC 2396 */
regcomp_wrapper(&url_re, "^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)"
"(\\?([^#]*))?(#(.*))?$", REG_EXTENDED);
regcomp_wrapper(&url_re, "^(([a-zA-Z][-a-zA-Z0-9+.]*):)?(//([^/?#]*))?"
"([^?#]*)(\\?([^#]*))?(#(.*))?$", REG_EXTENDED);
regcomp_wrapper(&url_up_re,
"/(|[^/]|[.][^./]|[^./][.]|[^/][^/][^/]+)/[.][.](/|$)",
REG_EXTENDED);