mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-13 04:17:49 +00:00
lodash: No longer have escape translate the ">" character. [jddalton, mathiasbynens]
Former-commit-id: 58d8ef98f3699a62b57a460b45921785fa2440b0
This commit is contained in:
@@ -2352,7 +2352,7 @@
|
|||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Escapes a string for insertion into HTML, replacing `&`, `<`, `>`, `"`, `'`,
|
* Escapes a string for insertion into HTML, replacing `&`, `<`, `"`, `'`,
|
||||||
* and `/` characters.
|
* and `/` characters.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
@@ -2369,7 +2369,6 @@
|
|||||||
return (string + '')
|
return (string + '')
|
||||||
.replace(/&/g, '&')
|
.replace(/&/g, '&')
|
||||||
.replace(/</g, '<')
|
.replace(/</g, '<')
|
||||||
.replace(/>/g, '>')
|
|
||||||
.replace(/"/g, '"')
|
.replace(/"/g, '"')
|
||||||
.replace(/'/g, ''')
|
.replace(/'/g, ''')
|
||||||
.replace(/\//g,'/');
|
.replace(/\//g,'/');
|
||||||
|
|||||||
10
test/test.js
10
test/test.js
@@ -112,6 +112,16 @@
|
|||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
QUnit.module('lodash.escape');
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
test('should not escape the ">" character', function() {
|
||||||
|
equal(_.escape('>'), '>');
|
||||||
|
});
|
||||||
|
}());
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
QUnit.module('lodash.forEach');
|
QUnit.module('lodash.forEach');
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user