Don't escape slash; it's unnecessary
Fixes #1444. Test Plan: grunt fasttest
Ben Alpert committed
Apr 28, 2014 at 23:22 UTC
0d3622714c3ec08344a7815df6fad808ecc1018e
2 files changed
+2
-4
src/utils/__tests__/escapeTextForBrowser-test.js
-1
@@ -46,7 +46,6 @@ describe('escapeTextForBrowser', function() {
46
expect(escaped).not.toContain('<');
47
expect(escaped).not.toContain('>');
48
expect(escaped).not.toContain('\'');
49
- expect(escaped).not.toContain('/');
49
expect(escaped).not.toContain('\"');
50
51
escaped = escapeTextForBrowser('&');
src/utils/escapeTextForBrowser.js
+2
-3
@@ -24,11 +24,10 @@ var ESCAPE_LOOKUP = {
24
">": ">",
25
"<": "<",
26
"\"": """,
27
- "'": "'",
28
- "/": "/"
27
+ "'": "'"
28
};
29
31
-var ESCAPE_REGEX = /[&><"'\/]/g;
30
+var ESCAPE_REGEX = /[&><"']/g;
31
32
function escaper(match) {
33
return ESCAPE_LOOKUP[match];