Merge branch 'master' of https://git.mcnd.ca/mcndave/picea
This commit is contained in:
commit
ded3d5e907
|
@ -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, '-')));
|
||||
|
|
Loading…
Reference in New Issue