Skip to content

xml2js 0.2 defaults have changed #26

Description

@timretout

As part of packaging webfinger for Debian, I noticed the test suite fails with xml2js 0.2.8. This patch fixes it:

Index: node-webfinger/lib/webfinger.js
===================================================================
--- node-webfinger.orig/lib/webfinger.js
+++ node-webfinger/lib/webfinger.js
@@ -95,7 +95,7 @@ var xrd2jrd = function(str, callback) {
     };
     Step(
         function() {
-            var parser = new xml2js.Parser();
+            var parser = new xml2js.Parser(xml2js.defaults["0.1"]);
             parser.parseString(str, this);
         },
         function(err, doc) {

Obviously the "real" fix would be to look into what has actually changed between 0.1 and 0.2, but I have not explored that yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions