api: fix function string_mask_to_regex: escape all special chars used in regex (bug #38398)

v2.8-utf8proc
Sebastien Helleu 2013-02-26 21:12:25 +01:00
parent cecb546c24
commit b84f6b5a1b
2 changed files with 3 additions and 1 deletions

View File

@ -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)

View File

@ -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;