Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

properly handle xml entities in command line.

  • Loading branch information...
commit 2bda883ee114ee33c83e48ca61dae653bd9230ad 1 parent 69229a9
@tyrasd authored
Showing with 10 additions and 3 deletions.
  1. +4 −0 CHANGELOG.md
  2. +2 −2 package.json
  3. +4 −1 parse_osmxml.js
View
4 CHANGELOG.md
@@ -1,3 +1,7 @@
+2.0.3
+-----
+* fix unresolved xml entities in command line mode
+
2.0.2
-----
* fix a dangling dependency (which led fresh installations to crash prematurely)
View
4 package.json
@@ -1,6 +1,6 @@
{
"name": "osmtogeojson",
- "version": "2.0.2",
+ "version": "2.0.3",
"description": "convert OSM to geojson",
"main": "index.js",
"scripts": {
@@ -27,7 +27,7 @@
"xmldom": "~0.1.16",
"optimist": "~0.3.5",
"concat-stream": "~1.0.1",
- "htmlparser2": "~3.0.5"
+ "htmlparser2": "3.5.1"
},
"devDependencies": {
"expect.js": "~0.2.0",
View
5 parse_osmxml.js
@@ -32,6 +32,9 @@ var p = new htmlparser.Parser({
json.elements.push(buffer);
}
}
+}, {
+ decodeEntities: true,
+ xmlMode: true
});
-module.exports = function(xml_str) { p.write(xml_str); p.end(); return json; }
+module.exports = function(xml_str) { p.write(xml_str); p.end(); return json; }
Please sign in to comment.
Something went wrong with that request. Please try again.