Socket
Socket
Sign inDemoInstall

jsesc

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsesc - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

README.md

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;

2

package.json
{
"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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc