Socket
Socket
Sign inDemoInstall

@oozcitak/dom

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oozcitak/dom - npm Package Compare versions

Comparing version 1.15.9 to 1.15.10

12

lib/parser/XMLParserImpl.d.ts

@@ -14,2 +14,14 @@ import { Document } from "../dom/interfaces";

parse(source: string): Document;
/**
* Decodes serialized text.
*
* @param text - text value to serialize
*/
private _decodeText;
/**
* Decodes serialized attribute value.
*
* @param text - attribute value to serialize
*/
private _decodeAttributeValue;
}

27

lib/parser/XMLParserImpl.js

@@ -35,3 +35,2 @@ "use strict";

var LocalNameSet_1 = require("../serializer/LocalNameSet");
var he_1 = require("he");
/**

@@ -106,3 +105,3 @@ * Represents a parser for XML content.

}
context.appendChild(doc.createTextNode(he_1.decode(text.data)));
context.appendChild(doc.createTextNode(this._decodeText(text.data)));
break;

@@ -189,5 +188,5 @@ case interfaces_1.TokenType.Element:

if (attNamespace !== null)
elementNode.setAttributeNS(attNamespace, attName, attValue);
elementNode.setAttributeNS(attNamespace, attName, this._decodeAttributeValue(attValue));
else
elementNode.setAttribute(attName, attValue);
elementNode.setAttribute(attName, this._decodeAttributeValue(attValue));
}

@@ -221,2 +220,22 @@ }

};
/**
* Decodes serialized text.
*
* @param text - text value to serialize
*/
XMLParserImpl.prototype._decodeText = function (text) {
return text == null ? text : text.replace(/&lt;/g, '<')
.replace(/&gt;/g, '>')
.replace(/&amp;/g, '&');
};
/**
* Decodes serialized attribute value.
*
* @param text - attribute value to serialize
*/
XMLParserImpl.prototype._decodeAttributeValue = function (text) {
return text == null ? text : text.replace(/&lt;/g, '<')
.replace(/&gt;/g, '>')
.replace(/&amp;/g, '&');
};
return XMLParserImpl;

@@ -223,0 +242,0 @@ }());

6

package.json
{
"name": "@oozcitak/dom",
"version": "1.15.9",
"version": "1.15.10",
"keywords": [

@@ -30,4 +30,3 @@ "dom",

"@oozcitak/url": "1.0.4",
"@oozcitak/util": "8.3.8",
"he": "1.2.0"
"@oozcitak/util": "8.3.8"
},

@@ -42,3 +41,2 @@ "devDependencies": {

"@types/xmldom": "*",
"@types/he": "*",
"benchmark": "*",

@@ -45,0 +43,0 @@ "chalk": "*",

Sorry, the diff of this file is not supported yet

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