aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/regexp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/regexp.c')
-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 */