feedparser
Advanced tools
Comparing version 0.10.0-beta to 0.10.1
@@ -101,3 +101,3 @@ /********************************************************************** | ||
} | ||
simplifiedAttributes[prefix + attr.local] = attr.value.trim(); | ||
simplifiedAttributes[prefix + attr.local] = attr.value ? attr.value.trim() : ''; | ||
}); | ||
@@ -590,6 +590,7 @@ return simplifiedAttributes; | ||
parser.options = options || {}; | ||
if (!('strict' in parser.options)) parser.options.strict = false; | ||
if (!('normalize' in parser.options)) parser.options.normalize = true; | ||
if (!('addmeta' in parser.options)) parser.options.addmeta = true; | ||
if (parser.options.feedurl) parser.xmlbase.unshift({ '#name': 'xml', '#': parser.options.feedurl}); | ||
parser.stream = sax.createStream(false /* strict mode - no */, {lowercase: true, xmlns: true }); // https://github.com/isaacs/sax-js | ||
parser.stream = sax.createStream(parser.options.strict /* strict mode - no by default */, {lowercase: true, xmlns: true }); // https://github.com/isaacs/sax-js | ||
parser.stream.on('error', function (e){ parser.handleSaxError(e, parser); }); | ||
@@ -596,0 +597,0 @@ parser.stream.on('opentag', function (n){ parser.handleOpenTag(n, parser); }); |
{ "name" : "feedparser" | ||
, "author" : "Dan MacTough <danmactough@gmail.com>" | ||
, "description" : "Robust RSS Atom and RDF feed parsing using sax js" | ||
, "version": "0.10.0-beta" | ||
, "version": "0.10.1" | ||
, "keywords" : ["rss", "feed", "atom", "rdf", "xml", "syndication"] | ||
@@ -23,2 +23,5 @@ , "homepage" : "http://github.com/danmactough/node-feedparser" | ||
} | ||
, "scripts": | ||
{ "test" : "./node_modules/mocha/bin/mocha --reporter list" | ||
} | ||
} |
@@ -11,3 +11,3 @@ var assert = require('assert') | ||
feedparser.parseUrl('http://nonexistingdomaincausinganerror.com/feed.rss', function (error, meta, articles) { | ||
assert.ifError(!error); | ||
assert(error instanceof Error, error.message); | ||
assert.equal(error.message, 'getaddrinfo ENOENT'); | ||
@@ -14,0 +14,0 @@ done(); |
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
443525
33
1500