]> _ Git - cubist_util.git/commitdiff
wip #6135 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 17 Jul 2023 16:21:33 +0000 (18:21 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 17 Jul 2023 16:21:33 +0000 (18:21 +0200)
src/Text.php

index d282c81275a3b09daa8957a5b43018149b3db7e3..c90d0a58fdf8489be00d63c0db35a1c0f9d8cac2 100644 (file)
@@ -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);