summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-03-16 16:07:11 +0400
committerAndrew Dolgov <[email protected]>2013-03-16 16:07:11 +0400
commitcc38c8e5497a8a86c3cc23f4f9e279a412c57727 (patch)
treebf4182d90fa1b81d6cc0e61500cd0386dbbfe6d9
parentef1162593f6aec45831dd458cec915e35f84bb09 (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
-rw-r--r--include/functions.php16
-rw-r--r--include/rssfuncs.php4
-rw-r--r--plugins/af_buttersafe/init.php2
-rw-r--r--plugins/af_explosm/init.php2
-rw-r--r--plugins/af_gocomics/init.php2
-rw-r--r--plugins/af_pennyarcade/init.php2
-rw-r--r--plugins/af_redditimgur/init.php2
7 files changed, 9 insertions, 21 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;
}
diff --git a/include/rssfuncs.php b/include/rssfuncs.php
index 0b1d06564..feffe0019 100644
--- a/include/rssfuncs.php
+++ b/include/rssfuncs.php
@@ -1082,7 +1082,7 @@
$node = $doc->getElementsByTagName('body')->item(0);
- return $doc->saveXML($node, LIBXML_NOEMPTYTAG);
+ return $doc->saveXML($node);
}
function expire_lock_files($debug) {
@@ -1280,7 +1280,7 @@
$node = $doc->getElementsByTagName('body')->item(0);
if ($node) {
- $content = $doc->saveXML($node, LIBXML_NOEMPTYTAG);
+ $content = $doc->saveXML($node);
return $content;
}
diff --git a/plugins/af_buttersafe/init.php b/plugins/af_buttersafe/init.php
index 12833540b..c9f6505cd 100644
--- a/plugins/af_buttersafe/init.php
+++ b/plugins/af_buttersafe/init.php
@@ -44,7 +44,7 @@ class Af_Buttersafe extends Plugin {
}
if ($basenode) {
- $article["content"] = $doc->saveXML($basenode, LIBXML_NOEMPTYTAG);
+ $article["content"] = $doc->saveXML($basenode);
$article["plugin_data"] = "buttersafe,$owner_uid:" . $article["plugin_data"];
}
}
diff --git a/plugins/af_explosm/init.php b/plugins/af_explosm/init.php
index 701eafeeb..2a8fab491 100644
--- a/plugins/af_explosm/init.php
+++ b/plugins/af_explosm/init.php
@@ -44,7 +44,7 @@ class Af_Explosm extends Plugin {
}
if ($basenode) {
- $article["content"] = $doc->saveXML($basenode, LIBXML_NOEMPTYTAG);
+ $article["content"] = $doc->saveXML($basenode);
$article["plugin_data"] = "explosm,$owner_uid:" . $article["plugin_data"];
}
}
diff --git a/plugins/af_gocomics/init.php b/plugins/af_gocomics/init.php
index da5242595..466ec9687 100644
--- a/plugins/af_gocomics/init.php
+++ b/plugins/af_gocomics/init.php
@@ -44,7 +44,7 @@ class Af_GoComics extends Plugin {
}
if ($basenode) {
- $article["content"] = $doc->saveXML($basenode, LIBXML_NOEMPTYTAG);
+ $article["content"] = $doc->saveXML($basenode);
$article["plugin_data"] = "gocomics,$owner_uid:" . $article["plugin_data"];
}
}
diff --git a/plugins/af_pennyarcade/init.php b/plugins/af_pennyarcade/init.php
index bf07b94a7..26d19bc01 100644
--- a/plugins/af_pennyarcade/init.php
+++ b/plugins/af_pennyarcade/init.php
@@ -44,7 +44,7 @@ class Af_PennyArcade extends Plugin {
}
if ($basenode) {
- $article["content"] = $doc->saveXML($basenode, LIBXML_NOEMPTYTAG);
+ $article["content"] = $doc->saveXML($basenode);
$article["plugin_data"] = "pennyarcade,$owner_uid:" . $article["plugin_data"];
}
}
diff --git a/plugins/af_redditimgur/init.php b/plugins/af_redditimgur/init.php
index b2bc975e2..2bb44f6d3 100644
--- a/plugins/af_redditimgur/init.php
+++ b/plugins/af_redditimgur/init.php
@@ -113,7 +113,7 @@ class Af_RedditImgur extends Plugin {
$node = $doc->getElementsByTagName('body')->item(0);
if ($node && $found) {
- $article["content"] = $doc->saveXML($node, LIBXML_NOEMPTYTAG);
+ $article["content"] = $doc->saveXML($node);
if (!$force) $article["plugin_data"] = "redditimgur,$owner_uid:" . $article["plugin_data"];
}
}