1
0
mirror of https://github.com/aureliendavid/rsspreview.git synced 2025-08-22 19:28:39 +00:00

fix handling of xhtml atom content (#9)

This commit is contained in:
Aurelien David 2018-12-16 17:25:36 +01:00
parent bfaa15935e
commit 5cbe4f68c8
2 changed files with 6 additions and 6 deletions

View File

@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "RSSPreview",
"version": "2.3.1",
"version": "2.3.2",
"author": "Aurelien David",
"homepage_url": "https://github.com/aureliendavid/rsspreview",

View File

@ -85,11 +85,7 @@
for (var i = 0; i<tohtml.length; i++) {
// in case of xhtml the content is already parsed
if (tohtml[i].getAttribute("desctype") == "xhtml") {
tohtml[i].classList.add("feedEntryContent");
tohtml[i].classList.remove("feedRawContent");
}
else {
if (tohtml[i].getAttribute("desctype") != "xhtml") {
try {
var html_desc = html_parser.parseFromString('<div class="feedEntryContent">'+tohtml[i].innerText+'</div>', "text/html");
@ -110,6 +106,10 @@
if (a.getAttribute("todel") == "1") {
a.remove();
}
else if (a.getAttribute("desctype") == "xhtml") {
a.classList.add("feedEntryContent");
a.classList.remove("feedRawContent");
}
})
}