From c295be1f0f10bae382ee048c67e2d172ca5afe33 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 17 Nov 2016 23:08:07 +0100 Subject: [PATCH] Previous regex was incomplete --- wcfsetup/install/files/lib/util/StringUtil.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/lib/util/StringUtil.class.php b/wcfsetup/install/files/lib/util/StringUtil.class.php index 904b7bf8a4..149f081b78 100644 --- a/wcfsetup/install/files/lib/util/StringUtil.class.php +++ b/wcfsetup/install/files/lib/util/StringUtil.class.php @@ -80,11 +80,11 @@ final class StringUtil { // These regular expressions use character properties // to find characters defined as space in the unicode // specification. - // Do not merge the expressions, they are seperated for + // Do not merge the expressions, they are separated for // performance reasons. - $text = preg_replace('/^\p{Zs}+/u', '', $text); - $text = preg_replace('/\p{Zs}+$/u', '', $text); + $text = preg_replace('/[\p{Zs}\s]+$/u', '', $text); + return $text; } -- 2.20.1