feedparser
Advanced tools
Comparing version 2.2.8 to 2.2.9
2.2.9 / 2018-01-27 | ||
================== | ||
* Skip illegally-nested items | ||
* Add failing test for illegally nested items | ||
2.2.8 / 2018-01-07 | ||
@@ -3,0 +9,0 @@ ================== |
@@ -216,2 +216,3 @@ /********************************************************************** | ||
, baseurl | ||
, isIllegallyNested = false | ||
; | ||
@@ -301,2 +302,13 @@ var n = this.stack.shift(); | ||
isIllegallyNested = ( | ||
( node['#name'] === 'item' && this.stack[0]['#name'] === 'item' ) || | ||
( node['#name'] === 'entry' && this.stack[0]['#name'] === 'entry' ) || | ||
( (node['#local'] === 'item' && (node['#prefix'] === '' || node['#type'] === 'rdf')) && this.stack[0]['#name'] === 'item' ) || | ||
( (node['#local'] == 'entry' && (node['#prefix'] === '' || node['#type'] === 'atom')) && this.stack[0]['#name'] === 'entry' ) | ||
); | ||
if (isIllegallyNested) { | ||
return; | ||
} | ||
if (!this.meta.title) { // We haven't yet parsed all the metadata | ||
@@ -303,0 +315,0 @@ _.assign(this.meta, this.handleMeta(this.stack[0], this.meta['#type'], this.options)); |
@@ -8,3 +8,3 @@ { | ||
}, | ||
"version": "2.2.8", | ||
"version": "2.2.9", | ||
"keywords": [ | ||
@@ -11,0 +11,0 @@ "rss", |
79996
1347