mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 01:25:56 +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:
@@ -69,7 +69,7 @@ class FeedItem_Atom extends FeedItem_Common {
|
||||
$child = $content->childNodes->item($i);
|
||||
|
||||
if ($child->hasChildNodes()) {
|
||||
return $this->doc->saveXML($child);
|
||||
return $this->doc->saveHTML($child);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -89,7 +89,7 @@ class FeedItem_Atom extends FeedItem_Common {
|
||||
$child = $content->childNodes->item($i);
|
||||
|
||||
if ($child->hasChildNodes()) {
|
||||
return $this->doc->saveXML($child);
|
||||
return $this->doc->saveHTML($child);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -197,4 +197,4 @@ class FeedItem_Atom extends FeedItem_Common {
|
||||
return $encs;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user