From: Vincent Vanwaelscappel Date: Mon, 17 Jul 2023 16:21:33 +0000 (+0200) Subject: wip #6135 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=9c19b4464e84e2afc874346368c1ab20ca9b36fb;p=cubist_util.git wip #6135 @0.25 --- diff --git a/src/Text.php b/src/Text.php index d282c81..c90d0a5 100644 --- a/src/Text.php +++ b/src/Text.php @@ -283,7 +283,7 @@ class Text $str = self::deaccent($str); $str = preg_replace('/[^A-Za-z0-9_\s\'\:\/[\]-]/', '', $str); - return self::tidyURL($str, true); + return self::tidyURL($str, true,false); } @@ -776,7 +776,7 @@ class Text } if (!$keep_spaces) { - $str = str_replace(' ', '-', $str); + $str = preg_replace('/\s+/', '-', $str); } $str = preg_replace('/[-]+/', '-', $str);