diff --git a/includes/basetype.class.php b/includes/basetype.class.php index 66802309..84eebb30 100644 --- a/includes/basetype.class.php +++ b/includes/basetype.class.php @@ -752,7 +752,7 @@ trait spawnHelper abstract class Filter { - private static $pattern = "/[^\p{L}0-9\s_\-\'\.\?\*]/ui";// delete any char not in unicode, number, space, underscore, hyphen, single quote, dot or common wildcard + private static $pattern = "/[\p{C}]/ui"; // delete unprintable characters private static $wCards = ['*' => '%', '?' => '_']; private static $criteria = ['cr', 'crs', 'crv']; // [cr]iterium, [cr].[s]ign, [cr].[v]alue diff --git a/includes/kernel.php b/includes/kernel.php index 4918bb85..eb9d8c0a 100644 --- a/includes/kernel.php +++ b/includes/kernel.php @@ -96,7 +96,7 @@ foreach ($sets as $k => $v) else if ($v['flags'] & CON_FLAG_TYPE_BOOL) $val = (bool)$v['value']; else if ($v['flags'] & CON_FLAG_TYPE_STRING) - $val = preg_replace('/[^\p{L}0-9~\s_\-\'\/\.:,]/ui', '', $v['value']); + $val = preg_replace("/[\p{C}]/ui", '', $v['value']); else if ($php) { trigger_error('PHP config value '.strtolower($k).' has no type set - config will not be used!', E_USER_ERROR);