1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-07-04 02:35:29 +00:00

Extend the URL_REGEX to allow more protocol and stuff like %XX in path part

Thanks to peder for suggestions.
This commit is contained in:
Jonas Fonseca 2005-12-25 15:45:47 +01:00 committed by Jonas Fonseca
parent 4fa0937ca5
commit 2d020e4879

View File

@ -56,7 +56,7 @@ struct dom_renderer {
struct screen_char styles[DOM_NODES];
};
#define URL_REGEX "(ftp|http)://[[:alnum:]]+([-_\\.]?[[:alnum:]])*\\.[[:alpha:]]{2,4}(\\/{1}[-_~&=;\\?\\.a-z0-9]*)*"
#define URL_REGEX "((f|ht|nt)tp(s)?|smb|file)://[[:alnum:]]+([-@:.]?[[:alnum:]])*\\.[[:alpha:]]{2,4}(:[[:digit:]]+)?(/(%[[:xdigit:]]{2}|[-_~&=;?.a-z0-9])*)*"
#define URL_REGFLAGS (REG_ICASE | REG_EXTENDED)
static void