$xpath = new DOMXPath($doc);
$entries = $xpath->query('(//a[@href]|//img[@src])');
- $br_inserted = 0;
foreach ($entries as $entry) {
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) {
// 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;
}
$node = $doc->getElementsByTagName('body')->item(0);
- return $doc->saveXML($node, LIBXML_NOEMPTYTAG);
+ return $doc->saveXML($node);
}
function expire_lock_files($debug) {
$node = $doc->getElementsByTagName('body')->item(0);
if ($node) {
- $content = $doc->saveXML($node, LIBXML_NOEMPTYTAG);
+ $content = $doc->saveXML($node);
return $content;
}
}
if ($basenode) {
- $article["content"] = $doc->saveXML($basenode, LIBXML_NOEMPTYTAG);
+ $article["content"] = $doc->saveXML($basenode);
$article["plugin_data"] = "buttersafe,$owner_uid:" . $article["plugin_data"];
}
}
}
if ($basenode) {
- $article["content"] = $doc->saveXML($basenode, LIBXML_NOEMPTYTAG);
+ $article["content"] = $doc->saveXML($basenode);
$article["plugin_data"] = "explosm,$owner_uid:" . $article["plugin_data"];
}
}
}
if ($basenode) {
- $article["content"] = $doc->saveXML($basenode, LIBXML_NOEMPTYTAG);
+ $article["content"] = $doc->saveXML($basenode);
$article["plugin_data"] = "gocomics,$owner_uid:" . $article["plugin_data"];
}
}
}
if ($basenode) {
- $article["content"] = $doc->saveXML($basenode, LIBXML_NOEMPTYTAG);
+ $article["content"] = $doc->saveXML($basenode);
$article["plugin_data"] = "pennyarcade,$owner_uid:" . $article["plugin_data"];
}
}
$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"];
}
}