Add back accidentally removed semicolons to escape.js.

This commit is contained in:
John-David Dalton
2019-07-02 16:08:37 -07:00
parent 8bc17fe659
commit dce7fccbb6

View File

@@ -1,10 +1,10 @@
/** Used to map characters to HTML entities. */
const htmlEscapes = {
'&': '&amp',
'<': '&lt',
'>': '&gt',
'"': '&quot',
"'": '&#39'
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
"'": '&#39;'
}
/** Used to match HTML entities and HTML characters. */
@@ -36,7 +36,7 @@ const reHasUnescapedHtml = RegExp(reUnescapedHtml.source)
* @example
*
* escape('fred, barney, & pebbles')
* // => 'fred, barney, &amp pebbles'
* // => 'fred, barney, &amp; pebbles'
*/
function escape(string) {
return (string && reHasUnescapedHtml.test(string))