From a124ab201b45ee80101817886386ccfade595bab Mon Sep 17 00:00:00 2001 From: Aurelien David Date: Tue, 22 Apr 2025 13:17:58 +0200 Subject: [PATCH] fix for rss1 following 6a36b62 (#89) v3.33.1 --- manifest.json | 2 +- rsspreview.js | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/manifest.json b/manifest.json index ea5ad15..069a295 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "RSSPreview", - "version": "3.33", + "version": "3.33.1", "author": "Aurelien David", "homepage_url": "https://github.com/aureliendavid/rsspreview", diff --git a/rsspreview.js b/rsspreview.js index da1e3ef..31869c2 100644 --- a/rsspreview.js +++ b/rsspreview.js @@ -169,7 +169,7 @@ //only do it if there's a tag to avoid doing it when text titles cointain a '&' //(which can be caught but still displays an error in console, which is annoying) if (et[i].innerText.indexOf('<') >= 0 || et[i].innerText.indexOf('&')) { - console.log(et[i].innerText); + let tmp = document.createElement('span'); try { tmp.innerHTML = et[i].innerText; @@ -267,9 +267,12 @@ let isRSS1 = false; - if (rootName == 'rdf' || rootName == 'rdf:rdf') - if (rootNode.attributes['xmlns']) - isRSS1 = rootNode.attributes['xmlns'].nodeValue.search('rss') > 0; + if (rootName == 'rdf' || rootName == 'rdf:rdf') { + if (rootNode.documentElement.attributes['xmlns']) { + isRSS1 = rootNode.documentElement.attributes['xmlns'].nodeValue.search('rss') > 0; + } + + } if ( rootName == 'rss' ||