diff options
author | Andrew Dolgov <[email protected]> | 2013-03-16 16:07:11 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-03-16 16:07:11 +0400 |
commit | cc38c8e5497a8a86c3cc23f4f9e279a412c57727 (patch) | |
tree | bf4182d90fa1b81d6cc0e61500cd0386dbbfe6d9 /include/functions.php | |
parent | ef1162593f6aec45831dd458cec915e35f84bb09 (diff) |
remove LIBXML_NOEMPTYTAG because of double <br/>s - the #357 issue with
htmlpurifier might not be relevant anymore because of htmLawed switch,
but <br/>s are annoying
Diffstat (limited to 'include/functions.php')
-rw-r--r-- | include/functions.php | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/include/functions.php b/include/functions.php index 4e16c9f19..dd40b9529 100644 --- a/include/functions.php +++ b/include/functions.php @@ -2575,7 +2575,6 @@ $xpath = new DOMXPath($doc); $entries = $xpath->query('(//a[@href]|//img[@src])'); - $br_inserted = 0; foreach ($entries as $entry) { @@ -2594,22 +2593,11 @@ if (strtolower($entry->nodeName) == "a") { $entry->setAttribute("target", "_blank"); } - - if (strtolower($entry->nodeName) == "img" && !$br_inserted) { - $br = $doc->createElement("br"); - - if ($entry->parentNode->nextSibling) { - $entry->parentNode->insertBefore($br, $entry->nextSibling); - $br_inserted = 1; - } - - } } $node = $doc->getElementsByTagName('body')->item(0); - // http://tt-rss.org/redmine/issues/357 - return $doc->saveXML($node, LIBXML_NOEMPTYTAG); + return $doc->saveXML($node); } function check_for_update($link) { @@ -3774,7 +3762,7 @@ // http://tt-rss.org/forum/viewtopic.php?f=1&t=970 if ($node) - return $doc->saveXML($node, LIBXML_NOEMPTYTAG); + return $doc->saveXML($node); else return $html; } |