This commit is contained in:
Dave M. 2023-02-01 18:09:01 +00:00
commit ded3d5e907
1 changed files with 1 additions and 1 deletions

View File

@ -126,7 +126,7 @@ PATTERN;
# src: https://stackoverflow.com/a/14550919
public static function slug(string $text, string $separator = '-') : string
{
$clean = iconv('UTF-8', 'ASCII//TRANSLIT', $text);
$clean = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $text);
$clean = preg_replace("/[^a-zA-Z0-9\/_| -]/", '', $clean);
return preg_replace("/[\/_| -]+/", $separator, strtolower(trim($clean, '-')));