Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
adding back regexEscape() back to StringUtils. It was accidentally re…
Browse files Browse the repository at this point in the history
…moved earlier
  • Loading branch information
tvoliter committed May 21, 2012
1 parent b88d70f commit baa5fde
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/utils/StringUtils.js
Expand Up @@ -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;
});

0 comments on commit baa5fde

Please sign in to comment.