Comparing version 2.2.0 to 2.3.0
10
jsesc.js
@@ -85,3 +85,3 @@ 'use strict'; | ||
'escapeEverything': false, | ||
'escapeEtago': false, | ||
'isScriptContext': false, | ||
'quotes': 'single', | ||
@@ -298,5 +298,7 @@ 'wrap': false, | ||
} | ||
if (options.escapeEtago) { | ||
if (options.isScriptContext) { | ||
// https://mathiasbynens.be/notes/etago | ||
return result.replace(/<\/(script|style)/gi, '<\\/$1'); | ||
return result | ||
.replace(/<\/(script|style)/gi, '<\\/$1') | ||
.replace(/<!--/g, json ? '\\u003C!--' : '\\x3C!--'); | ||
} | ||
@@ -306,4 +308,4 @@ return result; | ||
jsesc.version = '2.1.0'; | ||
jsesc.version = '2.3.0'; | ||
module.exports = jsesc; |
{ | ||
"name": "jsesc", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"description": "A JavaScript library for escaping JavaScript strings while generating the shortest possible valid output.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://mths.be/jsesc", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
30715
6
295
0
396