aboutsummaryrefslogtreecommitdiffstats
path: root/src/url.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-06-01 23:15:31 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-06-01 23:15:31 +0400
commit21844599898aa8b44df6425914995e1b7214ff52 (patch)
tree60c3db06d89bbebf7f6134d1c7006313f82b175d /src/url.c
parent4eb2985d1ef3631fca82cbf18cc2e8d7aab9b096 (diff)
downloadrspamd-21844599898aa8b44df6425914995e1b7214ff52.tar.gz
rspamd-21844599898aa8b44df6425914995e1b7214ff52.zip
* Fix url grabbing regexp to match urls like <a href=http://blah.com>
Diffstat (limited to 'src/url.c')
-rw-r--r--src/url.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/url.c b/src/url.c
index 875358ae0..e6a4a215c 100644
--- a/src/url.c
+++ b/src/url.c
@@ -64,7 +64,7 @@ static const char *text_url = "((https?|ftp)://)?"
"(?<![\\s>?!),.'\"\\]:])"
"(?!@)"
")";
-static const char *html_url = "(?: src|href)=\"("
+static const char *html_url = "(?: src|href)=\"?("
"((https?|ftp)://)?"
"(\\b(?<![.\\@A-Za-z0-9-])"
"(?: [A-Za-z0-9][A-Za-z0-9-]*(?:\\.[A-Za-z0-9-]+)*\\."
@@ -80,7 +80,7 @@ static const char *html_url = "(?: src|href)=\"("
"(?:[/?][;/?:@&=+\\$,[\\]\\-_.!~*'()A-Za-z0-9#%]*)?" /* path (&query) */
"(?<![\\s>?!),.'\"\\]:])"
"(?!@)"
-"))\"";
+"))\"?";
static short url_initialized = 0;
GRegex *text_re, *html_re;