Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cb559a8

Browse files
committed
[Form] Don't trim unassigned unicode characters anymore
1 parent eaeb598 commit cb559a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Form/Util/StringUtil.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ private function __construct()
3333
*/
3434
public static function trim($string)
3535
{
36-
if (null !== $result = @preg_replace('/^[\pZ\pC]+|[\pZ\pC]+$/u', '', $string)) {
36+
if (null !== $result = @preg_replace('/^[\pZ\p{Cc}\p{Cf}\p{Co}\p{Cs}]+|[\pZ\p{Cc}\p{Cf}\p{Co}\p{Cs}]+$/u', '', $string)) {
3737
return $result;
3838
}
3939

0 commit comments

Comments
 (0)