mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 20:25:57 +00:00
Use 'saveHTML' when generating HTML from a DOMDocument.
This primarily occurs when modifying article content. If 'saveXML' is used following 'loadHTML' there is the possibility of strangeness, such as a self-closing anchor tag. Note that the DOMDocument used in 'classes/feeditem/atom.php' came from 'loadXML', but we use 'saveHTML' since we're returning HTML content.
This commit is contained in:
@@ -364,7 +364,7 @@ class Af_RedditImgur extends Plugin {
|
||||
$node = $doc->getElementsByTagName('body')->item(0);
|
||||
|
||||
if ($node && $found) {
|
||||
$article["content"] = $doc->saveXML($node);
|
||||
$article["content"] = $doc->saveHTML($node);
|
||||
} else if ($content_link) {
|
||||
$article = $this->readability($article, $content_link->getAttribute("href"), $doc, $xpath);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user