]> git.mxchange.org Git - friendica.git/commitdiff
Hashtags in attached link description now don't create misformatted text anymore.
authorMichael Vogel <icarus@dabo.de>
Fri, 2 Jan 2015 00:43:31 +0000 (01:43 +0100)
committerMichael Vogel <icarus@dabo.de>
Fri, 2 Jan 2015 00:43:31 +0000 (01:43 +0100)
include/bbcode.php

index 724b8e2fdd1a57cff97cc7748be1209f3ce850e1..1f635e051b2304ab2cc16d040e9b5a6d20c15635 100644 (file)
@@ -41,7 +41,9 @@ function bb_attachment($Text, $plaintext = false, $tryoembed = true) {
                        if ($matches[1] != "")
                                $title = $matches[1];
 
-                       $title = htmlentities($title, ENT_QUOTES, 'UTF-8', false);
+                       //$title = htmlentities($title, ENT_QUOTES, 'UTF-8', false);
+                       $title = bbcode(html_entity_decode($title), false, false, true);
+                       $title = str_replace(array("[", "]"), array("&#91;", "&#93;"), $title);
 
                        $image = "";
                        if ($type != "video") {
@@ -1171,6 +1173,6 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
 
        $a->save_timestamp($stamp1, "parser");
 
-       return $Text;
+       return trim($Text);
 }
 ?>