diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-08-01 14:23:20 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-08-01 14:23:20 +0200 |
commit | 055c2636639b7296d8fcfc25a82128f70f3da91e (patch) | |
tree | 1456a7d7f189ccb0c1db6075ca74ee552c5f7e73 /plugins/attachment_reminder | |
parent | 5d0cb00d5ef9e9647ab7f7ae913ff9d0d2684efc (diff) |
Fix regexp escaping
Diffstat (limited to 'plugins/attachment_reminder')
-rwxr-xr-x | plugins/attachment_reminder/attachment_reminder.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/attachment_reminder/attachment_reminder.js b/plugins/attachment_reminder/attachment_reminder.js index 50d661b3b..7ef2072c6 100755 --- a/plugins/attachment_reminder/attachment_reminder.js +++ b/plugins/attachment_reminder/attachment_reminder.js @@ -20,7 +20,7 @@ function rcmail_check_message(msg) { var i, rx, keywords = rcmail.gettext('keywords', 'attachment_reminder').split(",").concat([".doc", ".pdf"]); - $.each(keywords, function(n) { return RegExp.escape(n); }); + keywords = $.map(keywords, function(n) { return RegExp.escape(n); }); rx = new RegExp('(' + keywords.join('|') + ')', 'i'); return msg.search(rx) != -1; |