From 88638e8857d30c553c3eb467a0830cd70ec0f970 Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 28 Nov 2016 15:24:38 -0800 Subject: [PATCH] Support for more HTML colors in the [color] bbcode. --- e107_core/bbcodes/color.bb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/e107_core/bbcodes/color.bb b/e107_core/bbcodes/color.bb index ce3c32fbc..11fa8f2cf 100644 --- a/e107_core/bbcodes/color.bb +++ b/e107_core/bbcodes/color.bb @@ -33,9 +33,16 @@ if(array_key_exists($parm, $aColors)) } else { - if(preg_match("/(#[a-fA-F0-9]{3,6})/", $parm, $matches)) + if(preg_match("/(#[a-fA-F0-9]{3,12})/", $parm, $matches)) { return "$code_text"; } + + if(preg_match("/([a-zA-Z]{3,20})/", $parm, $matches)) // support color names http://www.w3schools.com/colors/colors_names.asp + { + return "$code_text"; + } + + } \ No newline at end of file