mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-11-30 11:05:23 +00:00
Lowercase color value at first (#76)
This commit is contained in:
parent
f8802fde1d
commit
323ce57065
|
@ -214,12 +214,12 @@ class InfoboxParamsValidator {
|
|||
* @return bool
|
||||
*/
|
||||
public function validateColorValue( $color ) {
|
||||
$color = strtolower( preg_replace( '/\s+/', '', $color ) );
|
||||
|
||||
if ( preg_match( self::REGEX_HEXRGB, $color ) ) {
|
||||
return substr( $color, 0, 1 ) === '#' ? $color : '#' . $color;
|
||||
}
|
||||
|
||||
$color = strtolower( preg_replace( '/\s+/', '', $color ) );
|
||||
|
||||
if ( isset( self::$colorNamesFlipped[$color] ) ||
|
||||
preg_match( self::REGEX_RGB, $color ) ||
|
||||
preg_match( self::REGEX_RGBA, $color ) ||
|
||||
|
|
Loading…
Reference in a new issue