From b84f6b5a1ba937e4cd312d0d62c8007958613678 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Tue, 26 Feb 2013 21:12:25 +0100 Subject: [PATCH] api: fix function string_mask_to_regex: escape all special chars used in regex (bug #38398) --- ChangeLog | 2 ++ src/core/wee-string.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5d22876e1..26c094e16 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,6 +26,8 @@ Version 0.4.1 (under dev!) weechat.history.max_buffer_lines_minutes is set (bug #38197) * core: use default hash/comparison callback for keys of type integer/pointer/time in hashtable +* api: fix function string_mask_to_regex: escape all special chars used in regex + (bug #38398) * aspell: add completion "aspell_dicts" (list of aspell installed dictionaries) * aspell: add info "aspell_dict" (dictionaries used on a buffer) * aspell: optimization on spellers to improve speed (save state by buffer) diff --git a/src/core/wee-string.c b/src/core/wee-string.c index 5add7c1fb..4b3b255c7 100644 --- a/src/core/wee-string.c +++ b/src/core/wee-string.c @@ -730,7 +730,7 @@ string_mask_to_regex (const char *mask) char *result; const char *ptr_mask; int index_result; - char *regex_special_char = ".[]{}()?+"; + char *regex_special_char = ".[]{}()?+|^$\\"; if (!mask) return NULL;