Fixed regex for color converter
authorAlexander Ebert <ebert@woltlab.com>
Sun, 25 Sep 2016 10:26:44 +0000 (12:26 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 25 Sep 2016 10:30:22 +0000 (12:30 +0200)
wcfsetup/install/files/lib/system/html/metacode/converter/ColorMetacodeConverter.class.php

index 1225d2b866a785f3019bfab9f83755011a551c11..0ca82ece7fbd4196860fa08e5d78ff67b20943f7 100644 (file)
@@ -31,7 +31,7 @@ class ColorMetacodeConverter extends AbstractMetacodeConverter {
                }
                
                // validates if code is a valid (short) HEX color code
-               if (!preg_match('~^#[A-F0-9]{3}(?:[A-F0-9]{3})?$~i', $attributes[0])) {
+               if (!preg_match('~^\#[A-F0-9]{3}(?:[A-F0-9]{3})?$~i', $attributes[0])) {
                        return false;
                }