diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index 5b26b0790a..a95c5ce0c9 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -58,7 +58,15 @@ function bbencode_second_pass($text, $uid) $text = str_replace("[/list:u:$uid]", '', $text); $text = str_replace("[/list:o:$uid]", '', $text); // Ordered lists - $text = preg_replace("/\[list=([a1]):$uid\]/si", '
' . $lang['Quote'] . ' |
', $text); @@ -147,6 +155,12 @@ function bbencode_first_pass($text, $uid) // ordered. $text = bbencode_first_pass_pda($text, $uid, $open_tag, "[/list]", "[/list:o]", false, 'replace_listitems'); + // [color] and [/color] for setting text color + $text = preg_replace("#\[color=(\#[0-9A-F]{6}|[a-z]+)\](.*?)\[/color\]#si", "[color=\\1:$uid]\\2[/color:$uid]", $text); + + // [size] and [/size] for setting text size + $text = preg_replace("#\[size=([\-\+]?[1-3])\](.*?)\[/size\]#si", "[size=\\1:$uid]\\2[/size:$uid]", $text); + // [b] and [/b] for bolding text. $text = preg_replace("#\[b\](.*?)\[/b\]#si", "[b:$uid]\\1[/b:$uid]", $text); |