diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-06-01 23:15:31 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-06-01 23:15:31 +0400 |
commit | 21844599898aa8b44df6425914995e1b7214ff52 (patch) | |
tree | 60c3db06d89bbebf7f6134d1c7006313f82b175d | |
parent | 4eb2985d1ef3631fca82cbf18cc2e8d7aab9b096 (diff) | |
download | rspamd-21844599898aa8b44df6425914995e1b7214ff52.tar.gz rspamd-21844599898aa8b44df6425914995e1b7214ff52.zip |
* Fix url grabbing regexp to match urls like <a href=http://blah.com>
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/url.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f744fff03..2d55565e9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ PROJECT(rspamd C) SET(RSPAMD_VERSION_MAJOR 0) SET(RSPAMD_VERSION_MINOR 1) -SET(RSPAMD_VERSION_PATCH 2) +SET(RSPAMD_VERSION_PATCH 3) SET(RSPAMD_VERSION "${RSPAMD_VERSION_MAJOR}.${RSPAMD_VERSION_MINOR}.${RSPAMD_VERSION_PATCH}") SET(RSPAMD_MASTER_SITE_URL "http://cebka.pp.ru/hg/rspamd") @@ -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; |