diff --git a/verify.php b/verify.php index 1586814..9b4ef75 100644 --- a/verify.php +++ b/verify.php @@ -409,7 +409,8 @@ class verify */ public static function staticIsAllowedChars ($val, $allowedChars) { - preg_match ('/^['.$allowedChars.']+/u', $val, $matches); + $allowedChars = preg_quote ($allowedChars, "#"); + preg_match ('#^['.$allowedChars.']+#u', $val, $matches); if (isset ($matches[0]) && mb_strlen ($matches[0]) === mb_strlen ($val)) return true;