In this specific case, there's no problem leaving it that way.
But if you find it weird or want better formatting, I leave the code of my function qa_slugify for you to copy if you want.
function qa_slugify($string, $asciiOnly = true, $maxLength = null)
{
if (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }
$words = qa_string_to_words($string, true, false, false);
if ($maxLength !== null) {
$wordlength = array();
foreach ($words as $index => $word) {
$wordlength[$index] = qa_strlen($word);
}
$remaining = $maxLength;
if (array_sum($wordlength) > $remaining) {
arsort($wordlength, SORT_NUMERIC); // sort with longest words first
foreach ($wordlength as $index => $length) {
if ($remaining > 0) {
$remaining -= $length;
} else {
unset($words[$index]);
}
}
}
}
$string = implode('-', $words);
if ($asciiOnly) {
//NOVO SCRIPT QUE ACEITA URL DE IDIOMAS COM CARACTERES ESTRANHOS
$string = html_entity_decode($string, ENT_QUOTES, 'utf-8');
if (function_exists('transliterator_transliterate')) {
// PHP 5.4 + intl
$string = transliterator_transliterate('Any-Latin; Latin-ASCII', $string);
}
if (function_exists('normalizer_normalize')) {
// PHP 5.3 + intl
$string = normalizer_normalize(preg_replace('/\\p{Mn}+/u', '', normalizer_normalize($string, Normalizer::FORM_D)), Normalizer::FORM_C);
}
if (function_exists('iconv') && ICONV_IMPL == 'glibc') {
$string = iconv('UTF-8', 'ASCII//TRANSLIT', $string);
}
// version incomplète (limitée au latin1)
$patterns = array('~&([A-za-z])(?:grave|acute|circ|tilde|uml|ring|cedil|slash|caron);~' => '\\1', '~&([A-za-z]{2})lig;~' => '\\1', '~&[^;]+;~' => ' ');
$string = htmlentities($string, ENT_NOQUOTES, 'UTF-8');
$string = preg_replace(array_keys($patterns), array_values($patterns), $string);
$string = str_replace(array('[\', \']'), '', $string);
$string = preg_replace('/\[.*\]/U', '', $string);
$string = htmlentities($string, ENT_QUOTES, 'UTF-8');
$string = preg_replace('/&(amp;)?#?[a-zA-Z0-9]+;/i', '-', $string);
$string = htmlentities($string, ENT_COMPAT, 'utf-8');
$string = preg_replace('/&([A-za-z])(acute|uml|circ|grave|ring|cedil|slash|tilde|caron|lig|quot|rsquo);/i', '', $string);
$string = preg_replace(array('/[^a-zA-Z0-9]/i', '/[-]+/') , '-', $string);
//ANTIGO SCRIPT QUE REMOVIA URL DE IDIOMAS COM CARACTERES ESTRANHOS
// convert accents to ASCII, then remove all remaining non-ASCII characters
//$string = qa_string_remove_accents($string);
//$string = preg_replace('/[^ a-zA-Z0-9-]/', '', $string);
//$string = preg_replace('/-{2,}/', '-', trim($string, '-'));
}
return $string;
}