Commit 7972da11 authored by mickadoo's avatar mickadoo

remove //TRANSLIT from iconv call as it isn't supported https://bugs.php.net/bug.php?id=44096

parent 3614dc57
......@@ -13,9 +13,10 @@ class StringTools {
* @return string The cleaned string, safe for use in URLs
*/
public static function urlSafe($s) {
$clean = iconv('UTF-8', 'ASCII//TRANSLIT', strtolower(trim($s)));
$clean = iconv('UTF-8', 'ASCII', strtolower(trim($s)));
$clean = preg_replace('#[^.a-zA-Z0-9/_|+ -]#', '', $clean);
$clean = preg_replace('#[/_|+ -]+#', '-', $clean);
return $clean;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment