-
Bug
-
Resolution: Fixed
-
3.0.4
-
None
-
PHP Environment:
Database:
The format of an RGB value in hexadecimal notation is a '#' immediately followed by either three or six hexadecimal characters.
It's a minor flaw but since it's easy to fix, I figured it might be worth mentioning
Open includes/bbcode.php
Find:
case 6:
|
$this->bbcode_cache[$bbcode_id] = array(
|
'preg' => array(
|
'!\[color=(#[0-9a-f]{6}|[a-z\-]+):$uid\](.*?)\[/color:$uid\]!is' => $this->bbcode_tpl('color', $bbcode_id),
|
)
|
);
|
break;
|
Replace with:
case 6:
|
$this->bbcode_cache[$bbcode_id] = array(
|
'preg' => array(
|
'!\[color=(#[0-9a-f]{3}|#[0-9a-f]{6}|[a-z\-]+):$uid\](.*?)\[/color:$uid\]!is' => $this->bbcode_tpl('color', $bbcode_id),
|
)
|
);
|
break;
|
Open includes/message_parser.php
Find:
'color' => array('bbcode_id' => 6, 'regexp' => array('!\[color=(#[0-9a-f]{6}|[a-z\-]+)\](.*?)\[/color\]!ise' => "\$this->bbcode_color('\$1', '\$2')")),
|
Replace with:
'color' => array('bbcode_id' => 6, 'regexp' => array('!\[color=(#[0-9a-f]{3}|#[0-9a-f]{6}|[a-z\-]+)\](.*?)\[/color\]!ise' => "\$this->bbcode_color('\$1', '\$2')")),
|

