mirror of
https://github.com/aureliendavid/rsspreview.git
synced 2025-08-22 19:28:39 +00:00
handle titles with html entities as html titles (#80)
This commit is contained in:
parent
94c35d9051
commit
b9f80de6ac
@ -2,7 +2,7 @@
|
||||
|
||||
"manifest_version": 2,
|
||||
"name": "RSSPreview",
|
||||
"version": "3.20.2",
|
||||
"version": "3.21",
|
||||
"author": "Aurelien David",
|
||||
"homepage_url": "https://github.com/aureliendavid/rsspreview",
|
||||
|
||||
|
@ -169,12 +169,14 @@
|
||||
//basically removes html content if there is some
|
||||
//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) {
|
||||
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;
|
||||
et[i].innerText = tmp.textContent;
|
||||
} catch (e) {
|
||||
// if not parsable, display as text
|
||||
console.error(e);
|
||||
console.log(et[i].innerText);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user