From a89b0c6eb4308f3906c1d4cb2b61c91c4552dda6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ttger?= Date: Thu, 7 Dec 2023 15:39:50 +0100 Subject: [PATCH] simplify regex --- src/Rendering/Name/Name.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Rendering/Name/Name.php b/src/Rendering/Name/Name.php index 3ecce50..ec80ded 100644 --- a/src/Rendering/Name/Name.php +++ b/src/Rendering/Name/Name.php @@ -212,7 +212,7 @@ private function getNamesString($name, $rank) //contains nbsp prefixed by normal space or followed by normal space? $text = htmlentities($text); if (strpos($text, "  ") !== false || strpos($text, "  ") !== false) { - $text = preg_replace("/[\s]+/", "", $text); //remove normal spaces + $text = preg_replace("/\s+/", "", $text); //remove normal spaces return preg_replace("/ +/", " ", $text); } $text = html_entity_decode(preg_replace("/[\s]+/", " ", $text));