]> git.mxchange.org Git - friendica.git/blobdiff - include/bbcode.php
Merge pull request #3392 from Hypolite/issue/#3387
[friendica.git] / include / bbcode.php
index b955d6c790a04a8c3ba90bfa2df3a288b0e36c48..2715334e46b0712f39aa5e2f514eedc81599c81c 100644 (file)
@@ -63,7 +63,7 @@ function bb_attachment($Text, $simplehtml = false, $tryoembed = true) {
                        (similar_text($test1,$test2) / strlen($data["title"])) > 0.9)) {
                        $title2 = $data["url"];
                }
-               $text = sprintf('<a href="%s" title="%s" class="attachment thumbnail" rel="nofollow external">%s</a><br />',
+               $text = sprintf('<a href="%s" title="%s" class="attachment" rel="nofollow external">%s</a><br />',
                                $data["url"], $data["title"], $title2);
        } elseif (($simplehtml != 4) AND ($simplehtml != 0)) {
                $text = sprintf('<a href="%s" target="_blank">%s</a><br>', $data["url"], $data["title"]);
@@ -97,7 +97,7 @@ function bb_attachment($Text, $simplehtml = false, $tryoembed = true) {
                        }
                }
        }
-       return $data["text"] . $text . $data["after"];
+       return trim($data["text"].' '.$text.' '.$data["after"]);
 }
 
 function bb_remove_share_information($Text, $plaintext = false, $nolink = false) {
@@ -573,7 +573,7 @@ function GetProfileUsername($profile, $username, $compact = false, $getnetwork =
        $gplus = preg_replace("=https?://plus.google.com/(.*)=ism", "$1@plus.google.com", $profile);
        if ($gplus != $profile) {
                if ($getnetwork) {
-                       return NETWORK_GPLUS);
+                       return NETWORK_GPLUS;
                } elseif ($compact) {
                        return ($gplususername . " (" . $username . ")");
                } else {
@@ -769,7 +769,7 @@ function bb_CleanPictureLinks($text) {
 function bb_highlight($match) {
        if (in_array(strtolower($match[1]), ['php', 'css', 'mysql', 'sql', 'abap', 'diff', 'html', 'perl', 'ruby',
                'vbscript', 'avrc', 'dtd', 'java', 'xml', 'cpp', 'python', 'javascript', 'js', 'sh'])) {
-               return text_highlight($match[2],strtolower($match[1]));
+               return text_highlight($match[2], strtolower($match[1]));
        }
        return $match[0];
 }