From: Michael Date: Thu, 5 Sep 2019 05:14:43 +0000 (+0000) Subject: Issue 2199: Diaspora doesn't interpret size elements X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=aa6497c28151f013778a2e3fe11fa40509c864d3;p=friendica.git Issue 2199: Diaspora doesn't interpret size elements --- diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index f5b869979c..65d037b83d 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -1404,8 +1404,14 @@ class BBCode extends BaseObject // Check for sized text // [size=50] --> font-size: 50px (with the unit). - $text = preg_replace("(\[size=(\d*?)\](.*?)\[\/size\])ism", "$2", $text); - $text = preg_replace("(\[size=(.*?)\](.*?)\[\/size\])ism", "$2", $text); + if ($simple_html != 3) { + $text = preg_replace("(\[size=(\d*?)\](.*?)\[\/size\])ism", "$2", $text); + $text = preg_replace("(\[size=(.*?)\](.*?)\[\/size\])ism", "$2", $text); + } else { + // Issue 2199: Diaspora doesn't interpret the construct above, nor the or element + $text = preg_replace("(\[size=(.*?)\](.*?)\[\/size\])ism", "$2", $text); + } + // Check for centered text $text = preg_replace("(\[center\](.*?)\[\/center\])ism", "
$1
", $text);