@azure/core-xml
Advanced tools
Comparing version 1.3.1 to 1.3.2
@@ -19,3 +19,3 @@ // Copyright (c) Microsoft Corporation. | ||
function getParserOptions(options = {}) { | ||
return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: false }); | ||
return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true }); | ||
} | ||
@@ -50,3 +50,3 @@ /** | ||
const parser = new XMLParser(getParserOptions(opts)); | ||
const parsedXml = parser.parse(unescapeHTML(str)); | ||
const parsedXml = parser.parse(str); | ||
// Remove the <?xml version="..." ?> node. | ||
@@ -65,9 +65,2 @@ // This is a change in behavior on fxp v4. Issue #424 | ||
} | ||
function unescapeHTML(str) { | ||
return str | ||
.replace(/&/g, "&") | ||
.replace(/</g, "<") | ||
.replace(/>/g, ">") | ||
.replace(/"/g, '"'); | ||
} | ||
//# sourceMappingURL=xml.js.map |
@@ -33,3 +33,3 @@ 'use strict'; | ||
function getParserOptions(options = {}) { | ||
return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: false }); | ||
return Object.assign(Object.assign({}, getCommonOptions(options)), { parseAttributeValue: false, parseTagValue: false, attributeNamePrefix: "", stopNodes: options.stopNodes, processEntities: true }); | ||
} | ||
@@ -64,3 +64,3 @@ /** | ||
const parser = new fastXmlParser.XMLParser(getParserOptions(opts)); | ||
const parsedXml = parser.parse(unescapeHTML(str)); | ||
const parsedXml = parser.parse(str); | ||
// Remove the <?xml version="..." ?> node. | ||
@@ -79,9 +79,2 @@ // This is a change in behavior on fxp v4. Issue #424 | ||
} | ||
function unescapeHTML(str) { | ||
return str | ||
.replace(/&/g, "&") | ||
.replace(/</g, "<") | ||
.replace(/>/g, ">") | ||
.replace(/"/g, '"'); | ||
} | ||
@@ -88,0 +81,0 @@ exports.XML_ATTRKEY = XML_ATTRKEY; |
{ | ||
"name": "@azure/core-xml", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"description": "Core library for interacting with XML payloads", | ||
@@ -5,0 +5,0 @@ "sdk-type": "client", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
250
164
53642
459
31