]> git.mxchange.org Git - friendica.git/blobdiff - include/bbcode.php
When converting to HTML, hashtag addresses are now removed (only when the message...
[friendica.git] / include / bbcode.php
index 01c8f14df9f1ee9f26784e1fad3531719ecf64da..d16dcb6a7fcf7417a1b3ad9d168ccf10854c52af 100644 (file)
@@ -668,6 +668,12 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
 //             $Text = mb_convert_encoding($Text, "UTF-8", 'HTML-ENTITIES');
        //}
 
+       // Remove all hashtag addresses
+       if (!$tryoembed) {
+               $pattern = '/#<a.*?href="(.*?)".*?>(.*?)<\/a>/is';
+               $Text = preg_replace($pattern, '#$2', $Text);
+       }
+
        call_hooks('bbcode',$Text);
 
        $a->save_timestamp($stamp1, "parser");