Socket
Socket
Sign inDemoInstall

feedparser

Package Overview
Dependencies
8
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.5 to 1.1.6

.tern-port

9

History.md
1.1.6 / 2016-12-26
==================
* Update dev-dependency (iconv v2.2.1)
* Update dev-dependency (mocha v3.2.0)
* Fix xml declaration parsing to handle extra whitespace
* Fix assignment by reference in options parsing
* Update publish config for multiple distributions
1.1.5 / 2016-09-24

@@ -3,0 +12,0 @@ ==================

19

main.js

@@ -106,3 +106,3 @@ /**********************************************************************

FeedParser.prototype.parseOpts = function (options) {
this.options = options || {};
this.options = options ? util._extend({}, options) : {};
if (!('strict' in this.options)) this.options.strict = false;

@@ -148,9 +148,14 @@ if (!('normalize' in this.options)) this.options.normalize = true;

// parses the xml declaration, which looks like:
// <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
FeedParser.prototype.handleProcessingInstruction = function (node) {
if (node.name !== 'xml') return;
this.meta['#xml'] = node.body.replace(/(\r\n|\n|\r)/gm," ").trim().split(' ').reduce(function (map, attr) {
var parts = attr.split('=');
map[parts[0]] = parts[1] && parts[1].length > 2 && parts[1].match(/^.(.*?).$/)[1];
return map;
}, {});
if (node.name === 'xml') {
this.meta['#xml'] = node.body.trim().split(/\s+/).reduce(function (map, attr) {
if (attr.indexOf('=') >= 0) {
var parts = attr.split('=');
map[parts[0]] = parts[1] && parts[1].length > 2 && parts[1].match(/^.(.*?).$/)[1];
}
return map;
}, this.meta['#xml']);
}
};

@@ -157,0 +162,0 @@

@@ -5,3 +5,3 @@ {

"description": "Robust RSS Atom and RDF feed parsing using sax js",
"version": "1.1.5",
"version": "1.1.6",
"keywords": [

@@ -37,6 +37,9 @@ "rss",

"devDependencies": {
"iconv": "2.1.x",
"mocha": "~2.1.0",
"iconv": "2.2.1",
"mocha": "^3.2.0",
"request": "2.27.x"
},
"publishConfig": {
"tag": "1.x"
},
"scripts": {

@@ -43,0 +46,0 @@ "test": "mocha"

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc