only transliterate if the function exists
This commit is contained in:
parent
695d2db311
commit
0966f90b2c
@ -224,9 +224,12 @@ class DauxHelper
|
||||
public static function slug($title)
|
||||
{
|
||||
// Convert to ASCII
|
||||
$title = transliterator_transliterate("Any-Latin; NFD; [:Nonspacing Mark:] Remove; NFC;", $title);
|
||||
if (function_exists("transliterator_transliterate")) {
|
||||
$title = transliterator_transliterate("Any-Latin; NFD; [:Nonspacing Mark:] Remove; NFC;", $title);
|
||||
}
|
||||
|
||||
$title = iconv("utf-8", "ASCII//TRANSLIT//IGNORE", $title);
|
||||
|
||||
|
||||
// Remove unsupported characters
|
||||
$title = preg_replace('/[^\x20-\x7E]/u', '', $title);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user