From: friendica Date: Mon, 23 Apr 2012 12:42:46 +0000 (-0700) Subject: allow bbcode representation of html symbols such as © by wrapping in bb brackets X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e9e4fb664aab0f6cc4e8696eafc9ddba0797c11d;p=friendica.git allow bbcode representation of html symbols such as © by wrapping in bb brackets --- diff --git a/include/bbcode.php b/include/bbcode.php index 3697f1fc5d..85d310b75f 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -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('/\[\&\;([#a-z0-9]+)\;\]/','&$1;',$Text); + // fix any escaped ampersands that may have been converted into links $Text = preg_replace("/\<(.*?)(src|href)=(.*?)\&\;(.*?)\>/ism",'<$1$2=$3&$4>',$Text); if(strlen($saved_image))