Fixes issue #913. re-adding regexEscape() #914

Merged
merged 1 commit into from May 21, 2012
View
@@ -37,5 +37,10 @@ define(function (require, exports, module) {
.replace(/>/g, '>');
}
+ function regexEscape(str) {
+ return (str+'').replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1");
+ }
+
exports.htmlEscape = htmlEscape;
+ exports.regexEscape = regexEscape;
});