]> source.dussan.org Git - rspamd.git/commitdiff
* Fix url grabbing regexp to match urls like <a href=http://blah.com>
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Mon, 1 Jun 2009 19:15:31 +0000 (23:15 +0400)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Mon, 1 Jun 2009 19:15:31 +0000 (23:15 +0400)
CMakeLists.txt
src/url.c

index f744fff03a370b9b33fd0b4fe37e38d0a112d39c..2d55565e90c41d02ac46281baa7825c93614155a 100644 (file)
@@ -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")
index 875358ae018eb4864290f1708313403406dd25db..e6a4a215cd60414bc9ae81b8ff5bc0302da4cb65 100644 (file)
--- 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;