Socket
Socket
Sign inDemoInstall

feedparser

Package Overview
Dependencies
15
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.2.3 to 2.2.4

7

History.md
2.2.4 / 2017-11-08
==================
* Fix reresolve logic
* Add failing test - no reresolving first link in feed
* Add a test assertion for xml base resolution
2.2.3 / 2017-10-25

@@ -3,0 +10,0 @@ ==================

21

lib/utils.js

@@ -108,3 +108,9 @@ var URL = require('url')

if (Array.isArray(level[el])) {
level[el].forEach(resolveLevel);
// The shape of the array of element items is different than if the element is not an array.
// We need it to be the same shape to enable using the same function for recursion.
var levelFromArray = {};
level[el].forEach(function (attrs) {
levelFromArray[el] = attrs;
resolveLevel(levelFromArray);
});
} else {

@@ -116,12 +122,9 @@ if (level[el].constructor.name === 'Object') {

}
} else {
var attrs = Object.keys(level[el]);
attrs.forEach(function(name){
} else if ('@' in level[el]) {
var attrs = Object.keys(level[el]['@']);
attrs.forEach(function (name) {
if (name == 'href' || name == 'src' || name == 'uri') {
if ('string' === typeof level[el][name]) {
level[el][name] = URL.resolve(baseurl, level[el][name]);
if ('string' === typeof level[el]['@'][name]) {
level[el]['@'][name] = URL.resolve(baseurl, level[el]['@'][name]);
}
else if ('#' in level[el][name]) {
level[el][name]['#'] = URL.resolve(baseurl, level[el][name]['#']);
}
}

@@ -128,0 +131,0 @@ });

@@ -8,3 +8,3 @@ {

},
"version": "2.2.3",
"version": "2.2.4",
"keywords": [

@@ -11,0 +11,0 @@ "rss",

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