]> git.mxchange.org Git - friendica.git/commitdiff
allow bbcode representation of html symbols such as © by wrapping in bb brackets
authorfriendica <info@friendica.com>
Mon, 23 Apr 2012 12:42:46 +0000 (05:42 -0700)
committerfriendica <info@friendica.com>
Mon, 23 Apr 2012 12:42:46 +0000 (05:42 -0700)
include/bbcode.php

index 3697f1fc5d1dccbea26eb3c06f561e5e83edf60b..85d310b75f5ed621164f49dba5e71aa0e96132b4 100644 (file)
@@ -298,6 +298,9 @@ function bbcode($Text,$preserve_nl = false) {
        $Text = preg_replace_callback("/\[nobb\](.*?)\[\/nobb\]/ism", 'bb_unspacefy_and_trim',$Text);
        $Text = preg_replace_callback("/\[pre\](.*?)\[\/pre\]/ism", 'bb_unspacefy_and_trim',$Text);
 
+
+       $Text = preg_replace('/\[\&amp\;([#a-z0-9]+)\;\]/','&$1;',$Text);
+
        // fix any escaped ampersands that may have been converted into links
        $Text = preg_replace("/\<(.*?)(src|href)=(.*?)\&amp\;(.*?)\>/ism",'<$1$2=$3&$4>',$Text);
        if(strlen($saved_image))