Socket
Socket
Sign inDemoInstall

fast-xml-parser

Package Overview
Dependencies
Maintainers
1
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-xml-parser - npm Package Compare versions

Comparing version 4.0.10 to 4.0.11

3

CHANGELOG.md
Note: If you find missing information about particular minor version, that version must have been changed without any functional change in this library.
**4.0.11 / 2022-10-05**
* fix #501: parse for entities only once
**4.0.10 / 2022-09-14**

@@ -4,0 +7,0 @@ * fix broken links in demo site (By [Yannick Lang](https://github.com/layaxx))

2

package.json
{
"name": "fast-xml-parser",
"version": "4.0.10",
"version": "4.0.11",
"description": "Validate XML, Parse XML, Build XML without C/C++ based libraries",

@@ -5,0 +5,0 @@ "main": "./src/fxp.js",

@@ -23,3 +23,2 @@ 'use strict';

this.lastEntities = {
"amp" : { regex: /&(amp|#38|#x26);/g, val : "&"},
"apos" : { regex: /&(apos|#39|#x27);/g, val : "'"},

@@ -30,2 +29,3 @@ "gt" : { regex: /&(gt|#62|#x3E);/g, val : ">"},

};
this.ampEntity = { regex: /&(amp|#38|#x26);/g, val : "&"};
this.htmlEntities = {

@@ -369,2 +369,3 @@ "space": { regex: /&(nbsp|#160);/g, val: " " },

const replaceEntitiesValue = function(val){
if(this.options.processEntities){

@@ -385,2 +386,3 @@ for(let entityName in this.docTypeEntities){

}
val = val.replace( this.ampEntity.regex, this.ampEntity.val);
}

@@ -387,0 +389,0 @@ return val;

@@ -50,2 +50,4 @@ const { buildOptions} = require("./OptionsBuilder");

throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'")
}else if(value === "&"){
throw new Error("An entity with value '&' is not permitted");
}else{

@@ -52,0 +54,0 @@ this.externalEntities[key] = value;

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