mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
Simplify _.unescape to match the behavior of _.escape.
Former-commit-id: ec7f4cf9a6f44b1ba99f467c47d7e04d5596d76e
This commit is contained in:
12
lodash.js
12
lodash.js
@@ -57,7 +57,7 @@
|
||||
var reComplexDelimiter = /[-+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/;
|
||||
|
||||
/** Used to match HTML entities */
|
||||
var reEscapedHtml = /&(?:amp|lt|gt|quot|#[xX]27);/g;
|
||||
var reEscapedHtml = /&(?:amp|lt|gt|quot|#x27);/g;
|
||||
|
||||
/** Used to match empty string literals in compiled template source */
|
||||
var reEmptyStringLeading = /\b__p \+= '';/g,
|
||||
@@ -251,19 +251,13 @@
|
||||
"'": '''
|
||||
};
|
||||
|
||||
/**
|
||||
* Used to convert HTML entities to characters:
|
||||
*
|
||||
* Numeric character references are case-insensitive.
|
||||
* http://whatwg.org/html/syntax.html#character-references
|
||||
*/
|
||||
/** Used to convert HTML entities to characters */
|
||||
var htmlUnescapes = {
|
||||
'&': '&',
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'"': '"',
|
||||
''': "'",
|
||||
''': "'"
|
||||
''': "'"
|
||||
};
|
||||
|
||||
/** Used to determine if values are of the language type Object */
|
||||
|
||||
Reference in New Issue
Block a user