summaryrefslogtreecommitdiff
path: root/plugins/af_redditimgur
diff options
context:
space:
mode:
authorwn_ <[email protected]>2017-09-09 13:51:59 -0500
committerwn_ <[email protected]>2017-09-09 13:51:59 -0500
commitf3774b9d65cdd189d9caeac8066b8a3e27c5d549 (patch)
treeb02ef9ef2e2cde2787e0df5192a21df011df89d0 /plugins/af_redditimgur
parent153cb6d30510f9804fe596ac6777bc2f35111ae2 (diff)
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.
Diffstat (limited to 'plugins/af_redditimgur')
-rwxr-xr-xplugins/af_redditimgur/init.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/af_redditimgur/init.php b/plugins/af_redditimgur/init.php
index d08dfa7a6..ac23a4fa3 100755
--- a/plugins/af_redditimgur/init.php
+++ b/plugins/af_redditimgur/init.php
@@ -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);
}