comparison js/feed-parser.js @ 7:2bbb7617dd13

Alternatively use Atom links without the rel attribute
author Guido Berhoerster <guido+feed-preview@berhoerster.name>
date Tue, 27 Nov 2018 10:47:26 +0100
parents 5d7c13e998e9
children 376a0e415bba
comparison
equal deleted inserted replaced
6:5d7c13e998e9 7:2bbb7617dd13
226 if (titleElement !== null) { 226 if (titleElement !== null) {
227 title = titleElement.textContent.trim(); 227 title = titleElement.textContent.trim();
228 } 228 }
229 229
230 let linkElement = feedQueryXPath(this.document, entryElement, 230 let linkElement = feedQueryXPath(this.document, entryElement,
231 './atom:link[@href][@rel="alternate"]'); 231 './atom:link[@href][not(@rel) or @rel="alternate"]');
232 if (linkElement !== null) { 232 if (linkElement !== null) {
233 link = parseURL(linkElement.getAttribute('href'), this.url); 233 link = parseURL(linkElement.getAttribute('href'), this.url);
234 } 234 }
235 235
236 let updatedElement = feedQueryXPath(this.document, entryElement, 236 let updatedElement = feedQueryXPath(this.document, entryElement,