diff --git a/htdocs/class/module.textsanitizer.php b/htdocs/class/module.textsanitizer.php index 9d1a5b277..f37c1210a 100644 --- a/htdocs/class/module.textsanitizer.php +++ b/htdocs/class/module.textsanitizer.php @@ -367,9 +367,9 @@ public function &xoopsCodeDecode(&$text, $allowimage = 1) $replacements[] = '\\3'; $patterns[] = "/\[url=(['\"]?)([^'\"<>]*)\\1](.*)\[\/url\]/sU"; $replacements[] = '\\3'; - $patterns[] = "/\[color=(['\"]?)([a-zA-Z0-9#]*)\\1](.*)\[\/color\]/sU"; - $replacements[] = '\\3'; - $patterns[] = "/\[size=(['\"]?)([a-zA-Z0-9.#]*)\\1](.*)\[\/size\]/sU"; + $patterns[] = "/\[color=(['\"]?)([a-zA-Z0-9#]+)\\1?](.*)\[\/color\]/sU"; + $replacements[] = '\\3'; + $patterns[] = "/\[size=(['\"]?)([a-zA-Z0-9-]+)\\1?](.*)\[\/size\]/sU"; $replacements[] = '\\3'; $patterns[] = "/\[font=(['\"]?)([^;<>\*\(\)\"']*)\\1](.*)\[\/font\]/sU"; $replacements[] = '\\3';