Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "pixl-xml", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A simple module for parsing and composing XML.", | ||
@@ -5,0 +5,0 @@ "author": "Joseph Huckaby <jhuckaby@gmail.com>", |
@@ -6,3 +6,3 @@ # Overview | ||
* Pure JavaScript, no dependencies | ||
* Very fast parser (About 5X faster than [xml2js](https://www.npmjs.com/package/xml2js)) | ||
* Very fast parser (About 6X faster than [xml2js](https://www.npmjs.com/package/xml2js)) | ||
* Low memory usage (About 60% less than [xml2js](https://www.npmjs.com/package/xml2js)) | ||
@@ -286,2 +286,7 @@ * Fully synchronous operation, no callbacks | ||
# Known Issues | ||
* Serialized XML doesn't exactly match parsed XML. | ||
* Unicode XML entities are not decoded when parsed. | ||
# License | ||
@@ -288,0 +293,0 @@ |
14
xml.js
@@ -429,3 +429,3 @@ /* | ||
if (text == null) return ''; | ||
if (text && text.replace) { | ||
@@ -436,3 +436,3 @@ text = text.replace(/\&/g, "&"); // MUST BE FIRST | ||
} | ||
return text; | ||
@@ -444,3 +444,3 @@ }; | ||
if (text == null) return ''; | ||
if (text && text.replace) { | ||
@@ -453,3 +453,3 @@ text = text.replace(/\&/g, "&"); // MUST BE FIRST | ||
} | ||
return text; | ||
@@ -461,4 +461,4 @@ }; | ||
if (text == null) return ''; | ||
if (text && text.replace) { | ||
if (text && text.replace && text.match(/\&/)) { | ||
text = text.replace(/\<\;/g, "<"); | ||
@@ -470,3 +470,3 @@ text = text.replace(/\>\;/g, ">"); | ||
} | ||
return text; | ||
@@ -473,0 +473,0 @@ }; |
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
26463
311