mirror of
https://github.com/aureliendavid/rsspreview.git
synced 2025-08-23 03:38:44 +00:00
fix handling of xhtml atom content (#9)
This commit is contained in:
parent
bfaa15935e
commit
5cbe4f68c8
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "RSSPreview",
|
"name": "RSSPreview",
|
||||||
"version": "2.3.1",
|
"version": "2.3.2",
|
||||||
"author": "Aurelien David",
|
"author": "Aurelien David",
|
||||||
"homepage_url": "https://github.com/aureliendavid/rsspreview",
|
"homepage_url": "https://github.com/aureliendavid/rsspreview",
|
||||||
|
|
||||||
|
@ -85,11 +85,7 @@
|
|||||||
for (var i = 0; i<tohtml.length; i++) {
|
for (var i = 0; i<tohtml.length; i++) {
|
||||||
|
|
||||||
// in case of xhtml the content is already parsed
|
// in case of xhtml the content is already parsed
|
||||||
if (tohtml[i].getAttribute("desctype") == "xhtml") {
|
if (tohtml[i].getAttribute("desctype") != "xhtml") {
|
||||||
tohtml[i].classList.add("feedEntryContent");
|
|
||||||
tohtml[i].classList.remove("feedRawContent");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var html_desc = html_parser.parseFromString('<div class="feedEntryContent">'+tohtml[i].innerText+'</div>', "text/html");
|
var html_desc = html_parser.parseFromString('<div class="feedEntryContent">'+tohtml[i].innerText+'</div>', "text/html");
|
||||||
@ -110,6 +106,10 @@
|
|||||||
if (a.getAttribute("todel") == "1") {
|
if (a.getAttribute("todel") == "1") {
|
||||||
a.remove();
|
a.remove();
|
||||||
}
|
}
|
||||||
|
else if (a.getAttribute("desctype") == "xhtml") {
|
||||||
|
a.classList.add("feedEntryContent");
|
||||||
|
a.classList.remove("feedRawContent");
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user