From: Michael Vogel Date: Wed, 27 Aug 2014 23:14:46 +0000 (+0200) Subject: oembed: Prevent empty links X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5468b9b2a52f75f98905ca08d80559460807df39;p=friendica.git oembed: Prevent empty links --- diff --git a/include/oembed.php b/include/oembed.php index 4a95bd8a45..2ecb11e1f5 100755 --- a/include/oembed.php +++ b/include/oembed.php @@ -175,13 +175,16 @@ function oembed_format_object($j){ $embedlink .= $j->author_name; } + if (trim($embedlink) == "") + $embedlink = $embedurl; + $ret .= "$embedlink"; } //if (isset($j->author_name)) $ret.=" by ".$j->author_name; //if (isset($j->provider_name)) $ret.=" on ".$j->provider_name; } else { // add for html2bbcode conversion - $ret .= ""; + $ret .= "$embedurl"; } $ret.="
"; return mb_convert_encoding($ret, 'HTML-ENTITIES', mb_detect_encoding($ret));