Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Merged
merged 1 commit into from

2 participants

@tvoliter

adding back regexEscape() back to StringUtils. It was accidentally removed earlier

Fixes issue #913

@peterflynn
Owner

Reviewing

@peterflynn
Owner

Perfect -- merging!

@peterflynn peterflynn merged commit aa0154b into from
@peterflynn peterflynn referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 21, 2012
  1. @tvoliter
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/utils/StringUtils.js
View
5 src/utils/StringUtils.js
@@ -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;
});
Something went wrong with that request. Please try again.