added spaces + some curly braces + some usage of dbm::is_result()
Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
committed by
Roland Häder
parent
2ef3251293
commit
1dc4b60a5a
@@ -303,9 +303,11 @@ function oembed_html2bbcode($text) {
|
||||
$entries = $xpath->query("//span[$xattr]");
|
||||
|
||||
$xattr = "@rel='oembed'";//oe_build_xpath("rel","oembed");
|
||||
foreach($entries as $e) {
|
||||
foreach ($entries as $e) {
|
||||
$href = $xpath->evaluate("a[$xattr]/@href", $e)->item(0)->nodeValue;
|
||||
if(!is_null($href)) $e->parentNode->replaceChild(new DOMText("[embed]".$href."[/embed]"), $e);
|
||||
if (!is_null($href)) {
|
||||
$e->parentNode->replaceChild(new DOMText("[embed]".$href."[/embed]"), $e);
|
||||
}
|
||||
}
|
||||
return oe_get_inner_html( $dom->getElementsByTagName("body")->item(0) );
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user