X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Foembed.php;h=69583167cfedfdf7a8ef03dd6fe1a4ba9582eed9;hb=cbe4e2bf8c7b6fea2e700811a15b427e6141c9dd;hp=0d7e5ee84f165f8ae74cfc62eb14f94978a1d4eb;hpb=d87323c2bb54cd7e9b17a15e9926609ee07dc345;p=friendica.git diff --git a/include/oembed.php b/include/oembed.php index 0d7e5ee84f..69583167cf 100755 --- a/include/oembed.php +++ b/include/oembed.php @@ -11,7 +11,6 @@ function oembed_replacecb($matches){ function oembed_fetch_url($embedurl, $no_rich_type = false){ - $embedurl = trim($embedurl, "'"); $embedurl = trim($embedurl, '"'); @@ -110,6 +109,8 @@ function oembed_fetch_url($embedurl, $no_rich_type = false){ } } + call_hooks('oembed_fetch_url', $embedurl, $j); + return $j; } @@ -161,6 +162,7 @@ function oembed_format_object($j){ // add link to source if not present in "rich" type if ($j->type!='rich' || !strpos($j->html,$embedurl) ){ + $ret .= "

"; if (isset($j->title)) { if (isset($j->provider_name)) $ret .= $j->provider_name.": "; @@ -187,11 +189,12 @@ function oembed_format_object($j){ } //if (isset($j->author_name)) $ret.=" by ".$j->author_name; //if (isset($j->provider_name)) $ret.=" on ".$j->provider_name; + $ret .= "

"; } else { // add for html2bbcode conversion $ret .= "$embedurl"; + $ret.="
"; } - $ret.="
"; return mb_convert_encoding($ret, 'HTML-ENTITIES', mb_detect_encoding($ret)); }