Merge pull request #1461 from spicyj/no-esc-slash

Don't escape slash; it's unnecessary
This commit is contained in:
Cheng Lou
2014-07-03 11:05:16 -07:00
2 changed files with 2 additions and 4 deletions
@@ -46,7 +46,6 @@ describe('escapeTextForBrowser', function() {
expect(escaped).not.toContain('<');
expect(escaped).not.toContain('>');
expect(escaped).not.toContain('\'');
expect(escaped).not.toContain('/');
expect(escaped).not.toContain('\"');
escaped = escapeTextForBrowser('&');
+2 -3
View File
@@ -24,11 +24,10 @@ var ESCAPE_LOOKUP = {
">": "&gt;",
"<": "&lt;",
"\"": "&quot;",
"'": "&#x27;",
"/": "&#x2f;"
"'": "&#x27;"
};
var ESCAPE_REGEX = /[&><"'\/]/g;
var ESCAPE_REGEX = /[&><"']/g;
function escaper(match) {
return ESCAPE_LOOKUP[match];