Skip to content

Commit

Permalink
Merge pull request facebook#1461 from spicyj/no-esc-slash
Browse files Browse the repository at this point in the history
Don't escape slash; it's unnecessary
  • Loading branch information
chenglou committed Jul 3, 2014
2 parents 676aac1 + 0d36227 commit e8e0812
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/utils/__tests__/escapeTextForBrowser-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('&');
Expand Down
5 changes: 2 additions & 3 deletions src/utils/escapeTextForBrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit e8e0812

Please sign in to comment.