Skip to content

Commit

Permalink
Upgrade libxml to latest (0.17.1 breaks on node 6.x) (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
noisygerman authored and sonnyp committed May 28, 2016
1 parent a1fc70c commit f9d259b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions benchmarks/parsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
*/

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')
// var ltx = require('..')
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)
}
Expand Down
8 changes: 4 additions & 4 deletions lib/escape.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit f9d259b

Please sign in to comment.