lodash: No longer have escape translate the ">" character. [jddalton, mathiasbynens]

Former-commit-id: 58d8ef98f3699a62b57a460b45921785fa2440b0
This commit is contained in:
John-David Dalton
2012-05-03 00:45:21 -04:00
parent 04ca0ae309
commit 1a1bd5322c
2 changed files with 11 additions and 2 deletions

View File

@@ -2352,7 +2352,7 @@
/*--------------------------------------------------------------------------*/
/**
* Escapes a string for insertion into HTML, replacing `&`, `<`, `>`, `"`, `'`,
* Escapes a string for insertion into HTML, replacing `&`, `<`, `"`, `'`,
* and `/` characters.
*
* @static
@@ -2369,7 +2369,6 @@
return (string + '')
.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&#x27;')
.replace(/\//g,'&#x2F;');

View File

@@ -112,6 +112,16 @@
/*--------------------------------------------------------------------------*/
QUnit.module('lodash.escape');
(function() {
test('should not escape the ">" character', function() {
equal(_.escape('>'), '>');
});
}());
/*--------------------------------------------------------------------------*/
QUnit.module('lodash.forEach');
(function() {