Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xmldoc

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xmldoc - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

9

lib/xmldoc.js

@@ -140,5 +140,5 @@ (function () {

if (Object.prototype.hasOwnProperty.call(this.attr, name))
s += " " + name + '="' + this.attr[name] + '"';
s += " " + name + '="' + escapeXML(this.attr[name]) + '"';
var finalVal = this.val.trim().replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/&/g, '&amp;');
var finalVal = escapeXML(this.val.trim());

@@ -236,2 +236,7 @@ if (options && options.trimmed && finalVal.length > 25)

// escapes XML entities like "<", "&", etc.
function escapeXML(value){
return value.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/&/g, '&amp;').replace(/'/g, '&apos;').replace(/"/g, '&quot;');
}
// Are we being used in a Node-like environment?

@@ -238,0 +243,0 @@ if (typeof module !== 'undefined' && module.exports)

@@ -9,3 +9,3 @@ {

},
"version": "0.3.1",
"version": "0.3.2",
"main": "./index",

@@ -12,0 +12,0 @@ "dependencies": {

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