From: Vsevolod Stakhov Date: Mon, 1 Jun 2009 19:15:31 +0000 (+0400) Subject: * Fix url grabbing regexp to match urls like X-Git-Tag: 0.2.7~132^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=21844599898aa8b44df6425914995e1b7214ff52;p=rspamd.git * Fix url grabbing regexp to match urls like --- 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") 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)://)?" "(??!),.'\"\\]:])" "(?!@)" ")"; -static const char *html_url = "(?: src|href)=\"(" +static const char *html_url = "(?: src|href)=\"?(" "((https?|ftp)://)?" "(\\b(??!),.'\"\\]:])" "(?!@)" -"))\""; +"))\"?"; static short url_initialized = 0; GRegex *text_re, *html_re;