X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fbbcode.php;h=109ca743d654576b07f27f85c6f2fc4f6774594f;hb=791fc1d8b3c3cc6bb4e62ef4b6f81bb99c1d45ed;hp=9a43cdb305e140222650bcfdd9dd97f307da934b;hpb=3db3d2f1f7a1fef7ef39bccb087c52f9292c88ab;p=friendica.git diff --git a/include/bbcode.php b/include/bbcode.php index 9a43cdb305..109ca743d6 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -49,17 +49,21 @@ function bb_attachment($Text, $simplehtml = false, $tryoembed = true) { $data["title"] = str_replace(array("http://", "https://"), "", $data["title"]); } - if (((strpos($data["text"], "[img=") !== false) OR (strpos($data["text"], "[img]") !== false)) AND ($data["image"] != "")) { + if (((strpos($data["text"], "[img=") !== false) || (strpos($data["text"], "[img]") !== false)) && ($data["image"] != "")) { $data["preview"] = $data["image"]; $data["image"] = ""; } if ($simplehtml == 7) { $text = style_url_for_mastodon($data["url"]); - } elseif (($simplehtml != 4) AND ($simplehtml != 0)) { + } elseif (($simplehtml != 4) && ($simplehtml != 0)) { $text = sprintf('%s
', $data["url"], $data["title"]); } else { - $text = sprintf('', $data["type"]); + if ($simplehtml != 4) { + $text = sprintf('', $data["type"]); + } else { + $span_end = ''; + } $bookmark = array(sprintf('[bookmark=%s]%s[/bookmark]', $data["url"], $data["title"]), $data["url"], $data["title"]); if ($tryoembed) { @@ -71,22 +75,26 @@ function bb_attachment($Text, $simplehtml = false, $tryoembed = true) { if (strstr(strtolower($oembed), "