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

@adobe/acc-js-sdk

Package Overview
Dependencies
Maintainers
21
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adobe/acc-js-sdk - npm Package Compare versions

Comparing version 1.1.27 to 1.1.28

2

package.json
{
"name": "@adobe/acc-js-sdk",
"version": "1.1.27",
"version": "1.1.28",
"description": "ACC Javascript SDK",

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

@@ -383,9 +383,18 @@ /*

// Get the text of a node. Will return the text if the xml node contains
// only text and cdata nodes. Otherwise will return null
static _getTextIfTextNode(xml) {
const child = xml.firstChild;
let child = xml.firstChild;
if (!child) return null; // no children
if (xml.hasAttributes()) return null; // no attributes
if (child.nextSibling) return null; // more than 1 child
if (child.nodeType !== 3 && child.nodeType !== 4) return null;
const text = child.nodeValue;
let text = "";
while (child) {
// if child node is not text or cdata, it means we have a mix
// of text children and non-text children => we do not consider
// the xml node to be a text-only node
if (child.nodeType !== 3 && child.nodeType !== 4)
return null;
text = text + child.nodeValue;
child = child.nextSibling;
}
return text;

@@ -392,0 +401,0 @@ }

@@ -961,2 +961,19 @@ /*

});
it("Should handle content made of CDATA text", () => {
const xml = DomUtil.parse(`<delivery>
<source><![CDATA[<head></head>]]></source>
</delivery>`);
const json = DomUtil.toJSON(xml, "SimpleJson");
expect(json.$source).toBe("<head></head>")
});
it("Should handle content made of multiple CDATA text", () => {
const xml = DomUtil.parse(`<delivery>
<source><![CDATA[<head>]]><![CDATA[</head>]]></source>
</delivery>`);
const json = DomUtil.toJSON(xml, "SimpleJson");
expect(json.$source).toBe("<head></head>")
});
});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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