Skip to content
Browse files

Add more xml:base fallbacks. Resolves #64

  • Loading branch information...
1 parent 06fe385 commit 5bc1dc6d255bc01ee13a2d8fc8e88b72f039ed11 @danmactough committed Jun 3, 2013
Showing with 8 additions and 0 deletions.
  1. +8 −0 main.js
View
8 main.js
@@ -466,6 +466,10 @@ FeedParser.prototype.handleMeta = function handleMeta (node, type, options) {
} else if (Object.keys(link['@']).length === 0) { // RSS
if (!meta.link) meta.link = utils.get(link);
}
+ if (meta.link && this.xmlbase && this.xmlbase.length === 0) {
+ this.xmlbase.unshift({ '#name': 'xml', '#': meta.link});
+ this.stack[0] = utils.reresolve(this.stack[0], meta.link);
+ }
}, this);
} else {
if (el['@']['href']) { // Atom
@@ -488,6 +492,10 @@ FeedParser.prototype.handleMeta = function handleMeta (node, type, options) {
} else if (Object.keys(el['@']).length === 0) { // RSS
if (!meta.link) meta.link = utils.get(el);
}
+ if (meta.link && this.xmlbase && this.xmlbase.length === 0) {
+ this.xmlbase.unshift({ '#name': 'xml', '#': meta.link});
+ this.stack[0] = utils.reresolve(this.stack[0], meta.link);
+ }
}
break;
case('managingeditor'):

0 comments on commit 5bc1dc6

Please sign in to comment.
Something went wrong with that request. Please try again.