diff options
author | RichardHitt <rbh00@netcom.com> | 2013-01-02 23:47:58 -0800 |
---|---|---|
committer | RichardHitt <rbh00@netcom.com> | 2013-01-02 23:47:58 -0800 |
commit | f4c2c08ccbd12e8fbd07666effada7f7470c1dc2 (patch) | |
tree | 6faf9246cf89da1bd849de44e9c14cbd51cd272c /src/common | |
parent | 270a31535c6e134f1ee497c45b3a62bd334940eb (diff) |
Also allow URLs of of the form \.[a-z]+\/
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/url.c | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/src/common/url.c b/src/common/url.c index 4d9d9f33..e3834a70 100644 --- a/src/common/url.c +++ b/src/common/url.c @@ -396,19 +396,30 @@ re_url (void) scheme = g_strjoinv ("|", prefix); grist = g_strdup_printf ( "(" /* URL or HOST */ - SCHEME HOST OPT_PORT - "(" /* Optional "/path?query_string#fragment_id" */ - "/" /* Must start with slash */ - "(" - "(" LPAR NOPARENS RPAR ")" - "|" - "(" NOPARENS ")" - ")*" /* Zero or more occurrences of either of these */ - "(?<![.,?!\\]])" /* Not allowed to end with these */ - ")?" /* Zero or one of this /path?query_string#fragment_id thing */ - + "(" + SCHEME HOST OPT_PORT + "(" /* Optional "/path?query_string#fragment_id" */ + "/" /* Must start with slash */ + "(" + "(" LPAR NOPARENS RPAR ")" + "|" + "(" NOPARENS ")" + ")*" /* Zero or more occurrences of either of these */ + "(?<![.,?!\\]])" /* Not allowed to end with these */ + ")?" /* Zero or one of this /path?query_string#fragment_id thing */ + ")|(" + HOST OPT_PORT "/" + "(" /* Optional "path?query_string#fragment_id" */ + "(" + "(" LPAR NOPARENS RPAR ")" + "|" + "(" NOPARENS ")" + ")*" /* Zero or more occurrences of either of these */ + "(?<![.,?!\\]])" /* Not allowed to end with these */ + ")?" /* Zero or one of this /path?query_string#fragment_id thing */ + ")" ")" - , scheme + , scheme ); url_ret = make_re (grist, "re_url"); g_free (scheme); |