aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-05-12 12:46:10 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-05-12 12:46:10 +0100
commit3a201043a8eca6be7e7d9a8a06bf4ec18c4047ef (patch)
treeea64785468cbe42232a522245b22bd21fd39f720 /src
parent5912f1002bfb167232ce7ab2b23973644616ed1c (diff)
downloadrspamd-3a201043a8eca6be7e7d9a8a06bf4ec18c4047ef.tar.gz
rspamd-3a201043a8eca6be7e7d9a8a06bf4ec18c4047ef.zip
Use raw regexp instead of utf ones by default.
Now to enable utf8 match, one should specify 'u' modifier, for example, by adding '/u' to the slashed patterm.
Diffstat (limited to 'src')
-rw-r--r--src/libutil/regexp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libutil/regexp.c b/src/libutil/regexp.c
index 6f7d07f6f..deaca80a5 100644
--- a/src/libutil/regexp.c
+++ b/src/libutil/regexp.c
@@ -176,7 +176,8 @@ rspamd_regexp_new (const gchar *pattern, const gchar *flags,
flags_str = flags;
}
- regexp_flags |= PCRE_UTF8 ;
+ rspamd_flags |= RSPAMD_REGEXP_FLAG_RAW;
+ regexp_flags &= ~PCRE_UTF8;
if (flags_str != NULL) {
while (*flags_str) {
@@ -194,7 +195,8 @@ rspamd_regexp_new (const gchar *pattern, const gchar *flags,
regexp_flags |= PCRE_EXTENDED;
break;
case 'u':
- regexp_flags |= PCRE_UNGREEDY;
+ rspamd_flags &= ~RSPAMD_REGEXP_FLAG_RAW;
+ regexp_flags |= PCRE_UTF8;
break;
case 'O':
/* We optimize all regexps by default */