1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-13 18:24:57 +02:00

Fix $sanitizer->selectorValue() issue where it filtered out some UTF-8 symbols it doesn't need to per processwire/processwire-issues#54

This commit is contained in:
Ryan Cramer
2016-11-01 06:29:02 -04:00
parent b50b1f9a28
commit 78e9b4748d

View File

@@ -1510,7 +1510,7 @@ class Sanitizer extends Wire {
// value needs more filtering, replace all non-alphanumeric, non-single-quote and space chars
// See: http://php.net/manual/en/regexp.reference.unicode.php
// See: http://www.regular-expressions.info/unicode.html
$value = preg_replace('/[^[:alnum:]\pL\pN\pP\pM\p{Sm}\p{Sc}\p{Sk} \'\/]/u', ' ', $value);
$value = preg_replace('/[^[:alnum:]\pL\pN\pP\pM\p{S} \'\/]/u', ' ', $value);
// replace multiple space characters in sequence with just 1
$value = preg_replace('/\s\s+/u', ' ', $value);