mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Merge pull request #1461 from spicyj/no-esc-slash
Don't escape slash; it's unnecessary
This commit is contained in:
@@ -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('&');
|
||||
|
||||
@@ -24,11 +24,10 @@ var ESCAPE_LOOKUP = {
|
||||
">": ">",
|
||||
"<": "<",
|
||||
"\"": """,
|
||||
"'": "'",
|
||||
"/": "/"
|
||||
"'": "'"
|
||||
};
|
||||
|
||||
var ESCAPE_REGEX = /[&><"'\/]/g;
|
||||
var ESCAPE_REGEX = /[&><"']/g;
|
||||
|
||||
function escaper(match) {
|
||||
return ESCAPE_LOOKUP[match];
|
||||
|
||||
Reference in New Issue
Block a user