Socket
Socket
Sign inDemoInstall

xmlbuilder

Package Overview
Dependencies
Maintainers
1
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xmlbuilder - npm Package Compare versions

Comparing version 4.1.0 to 4.2.0

9

lib/XMLStringifier.js

@@ -12,2 +12,3 @@ // Generated by CoffeeScript 1.9.1

this.allowSurrogateChars = options != null ? options.allowSurrogateChars : void 0;
this.noDoubleEncoding = options != null ? options.noDoubleEncoding : void 0;
ref = (options != null ? options.stringify : void 0) || {};

@@ -155,7 +156,11 @@ for (key in ref) {

XMLStringifier.prototype.elEscape = function(str) {
return str.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\r/g, '&#xD;');
var ampregex;
ampregex = this.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g;
return str.replace(ampregex, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\r/g, '&#xD;');
};
XMLStringifier.prototype.attEscape = function(str) {
return str.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/"/g, '&quot;');
var ampregex;
ampregex = this.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g;
return str.replace(ampregex, '&amp;').replace(/</g, '&lt;').replace(/"/g, '&quot;');
};

@@ -162,0 +167,0 @@

{
"name": "xmlbuilder",
"version": "4.1.0",
"version": "4.2.0",
"keywords": [

@@ -5,0 +5,0 @@ "xml",

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