[Pkg-javascript-commits] [ltx] 447/469: Upgrade libxml to latest (0.17.1 breaks on node 6.x) (#93)

Jonas Smedegaard dr at jones.dk
Wed Aug 31 13:03:37 UTC 2016


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository ltx.

commit f9d259b57ae9e3b69997e16feda5583dd5ec6964
Author: Markus Westerholz <mwesterholz at gmail.com>
Date:   Sat May 28 09:15:43 2016 -0700

    Upgrade libxml to latest (0.17.1 breaks on node 6.x) (#93)
---
 benchmarks/parsers.js | 4 ++--
 lib/escape.js         | 8 ++++----
 package.json          | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/benchmarks/parsers.js b/benchmarks/parsers.js
index 48a74e2..4ebee36 100644
--- a/benchmarks/parsers.js
+++ b/benchmarks/parsers.js
@@ -6,7 +6,7 @@
 */
 
 var benchmark = require('benchmark')
-var node_xml = require('node-xml')
+var nodeXml = require('node-xml')
 var libxml = require('libxmljs')
 var expat = require('node-expat')
 var sax = require('sax')
@@ -14,7 +14,7 @@ var sax = require('sax')
 var LtxSaxParser = require('../lib/parsers/ltx')
 
 function NodeXmlParser () {
-  var parser = new node_xml.SaxParser(function (cb) {})
+  var parser = new nodeXml.SaxParser(function (cb) {})
   this.parse = function (s) {
     parser.parseString(s)
   }
diff --git a/lib/escape.js b/lib/escape.js
index c80e279..6ae404e 100644
--- a/lib/escape.js
+++ b/lib/escape.js
@@ -30,17 +30,17 @@ function unescapeXMLReplace (match) {
 }
 
 exports.escapeXML = function escapeXML (s) {
-  return s.replace(/\&|<|>|"|'/g, escapeXMLReplace)
+  return s.replace(/&|<|>|"|'/g, escapeXMLReplace)
 }
 
 exports.unescapeXML = function unescapeXML (s) {
-  return s.replace(/\&(amp|#38|lt|#60|gt|#62|quot|#34|apos|#39);/g, unescapeXMLReplace)
+  return s.replace(/&(amp|#38|lt|#60|gt|#62|quot|#34|apos|#39);/g, unescapeXMLReplace)
 }
 
 exports.escapeXMLText = function escapeXMLText (s) {
-  return s.replace(/\&|<|>/g, escapeXMLReplace)
+  return s.replace(/&|<|>/g, escapeXMLReplace)
 }
 
 exports.unescapeXMLText = function unescapeXMLText (s) {
-  return s.replace(/\&(amp|#38|lt|#60|gt|#62);/g, unescapeXMLReplace)
+  return s.replace(/&(amp|#38|lt|#60|gt|#62);/g, unescapeXMLReplace)
 }
diff --git a/package.json b/package.json
index 2d6c473..a423f27 100644
--- a/package.json
+++ b/package.json
@@ -42,7 +42,7 @@
   },
   "devDependencies": {
     "benchmark": "^2.1.0",
-    "libxmljs": "^0.17.1",
+    "libxmljs": "^0.18.0",
     "microtime": "^2.0.0",
     "node-expat": "^2.3.13",
     "node-xml": "^1.0.2",

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/ltx.git



More information about the Pkg-javascript-commits mailing list