Also allow URLs of of the form \.[a-z]+\/

This commit is contained in:
RichardHitt 2013-01-02 23:47:58 -08:00
parent 270a31535c
commit f4c2c08ccb
1 changed files with 23 additions and 12 deletions

View File

@ -396,6 +396,7 @@ 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 */
@ -406,7 +407,17 @@ re_url (void)
")*" /* 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
);