summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-08-01 14:23:20 +0200
committerAleksander Machniak <alec@alec.pl>2013-08-01 14:23:20 +0200
commit055c2636639b7296d8fcfc25a82128f70f3da91e (patch)
tree1456a7d7f189ccb0c1db6075ca74ee552c5f7e73
parent5d0cb00d5ef9e9647ab7f7ae913ff9d0d2684efc (diff)
Fix regexp escaping
-rwxr-xr-xplugins/attachment_reminder/attachment_reminder.js2
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;