mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-12 20:07:49 +00:00
Avoid maintaining the html escape/unescape regexes independently of the entity maps.
Former-commit-id: 847e58befee7641bc39af37bde12fc99da9edb28
This commit is contained in:
8
dist/lodash.compat.js
vendored
8
dist/lodash.compat.js
vendored
@@ -51,10 +51,6 @@
|
||||
reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
|
||||
reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
|
||||
|
||||
/** Used to match HTML entities and HTML characters */
|
||||
var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
|
||||
reUnescapedHtml = /[&<>"']/g;
|
||||
|
||||
/**
|
||||
* Used to match ES6 template delimiters
|
||||
* http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6
|
||||
@@ -1392,6 +1388,10 @@
|
||||
/** Used to convert HTML entities to characters */
|
||||
var htmlUnescapes = invert(htmlEscapes);
|
||||
|
||||
/** Used to match HTML entities and HTML characters */
|
||||
var reEscapedHtml = RegExp('(' + keys(htmlUnescapes).join('|') + ')', 'g'),
|
||||
reUnescapedHtml = RegExp('[' + keys(htmlEscapes).join('') + ']', 'g');
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user