mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 17:07:49 +00:00
Revert the backtick escape/unescape patch but keep the docs.
This commit is contained in:
26
dist/lodash.underscore.js
vendored
26
dist/lodash.underscore.js
vendored
@@ -33,8 +33,8 @@
|
||||
var idCounter = 0;
|
||||
|
||||
/** Used to match HTML entities and HTML characters */
|
||||
var reEscapedHtml = /&(?:amp|lt|gt|quot|#x27|#96);/g,
|
||||
reUnescapedHtml = /[&<>"'`]/g;
|
||||
var reEscapedHtml = /&(?:amp|lt|gt|quot|#x27);/g,
|
||||
reUnescapedHtml = /[&<>"']/g;
|
||||
|
||||
/** Used to match template delimiters */
|
||||
var reEscape = /<%-([\s\S]+?)%>/g,
|
||||
@@ -61,23 +61,18 @@
|
||||
/**
|
||||
* Used to convert characters to HTML entities.
|
||||
*
|
||||
* Note: Though the `>` character is escaped for symmetry, characters like `>`
|
||||
* and `/` don't require escaping in HTML and have no special meaning unless
|
||||
* they're part of a tag or unquoted attribute value.
|
||||
* Note: Though the ">" character is escaped for symmetry, characters like
|
||||
* ">", "`", and "/" don't require escaping in HTML and have no special meaning
|
||||
* unless they're part of a tag or unquoted attribute value.
|
||||
* See [Mathias' article](http://mathiasbynens.be/notes/ambiguous-ampersands)
|
||||
* (under "semi-related fun fact") for more details.
|
||||
*
|
||||
* Backticks are escaped because IE < 9 allows them to be used as attribute
|
||||
* value delimiters. See [Ryan Grove's article](http://wonko.com/post/html-escaping)
|
||||
* for more details.
|
||||
*/
|
||||
var htmlEscapes = {
|
||||
'&': '&',
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'"': '"',
|
||||
"'": ''',
|
||||
'`': '`'
|
||||
"'": '''
|
||||
};
|
||||
|
||||
/** Used to convert HTML entities to characters */
|
||||
@@ -86,8 +81,7 @@
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'"': '"',
|
||||
''': "'",
|
||||
'`': '`'
|
||||
''': "'"
|
||||
};
|
||||
|
||||
/** Used to determine if values are of the language type Object */
|
||||
@@ -4424,7 +4418,7 @@
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to
|
||||
* Converts the characters "&", "<", ">", '"', and "'" in `string` to
|
||||
* their corresponding HTML entities.
|
||||
*
|
||||
* Note: No other characters are escaped. To escape additional characters
|
||||
@@ -4593,8 +4587,8 @@
|
||||
|
||||
/**
|
||||
* The inverse of `_.escape`; this method converts the HTML entities
|
||||
* `&`, `<`, `>`, `"`, `'`, and ``` in `string` to
|
||||
* their corresponding characters.
|
||||
* `&`, `<`, `>`, `"`, and `'` in `string` to their
|
||||
* corresponding characters.
|
||||
*
|
||||
* Note: No other HTML entities are unescaped. To unescape additional HTML
|
||||
* entities use a third-party library like [_he_](http://mths.be/he).
|
||||
|
||||
Reference in New Issue
Block a user