Permalink
Browse files

Escape special REGEX characters. Closes #884

  • Loading branch information...
1 parent b3ec9df commit 31aa19341cbb64fe5505c5a2d9556e36cd1a39d3 @brendo brendo committed Nov 9, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 symphony/assets/symphony.tags.js
@@ -67,7 +67,7 @@
// Multiple
else {
- var exp = new RegExp('^' + tag + '$', 'i'),
+ var exp = new RegExp('^' + tag.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") + '$', 'i'),
tags = value.split(/,\s*/),
removed = false;

0 comments on commit 31aa193

Please sign in to comment.