eso se debe a la codificacion de los caracteres entrantes
prueba esto
Código PHP:
$foo = 'acentos_á_é_í_ó_ú_ñ';
$foo = utf8_decode($foo);
echo Khaus_Uri_Seo::safeName($foo);
tambien podrias editar la linea del codigo
Código PHP:
class Khaus_Uri_Seo
{
static public function removeAccents($string)
{
$html = get_html_translation_table(HTML_ENTITIES);
$html = array_slice($html, 32, -4);
foreach ($html as $char => $entitie) {
$bar[] = substr($entitie, 1, 1);
}
$string = htmlentities($string, ENT_QUOTES, 'UTF-8'); // agregado para problema con codificacion
$string = str_replace($html, $bar, $string);
return $string;
}
static public function safeName($string)
{
$string = self::removeAccents($string);
$string = strtolower($string);
$string = preg_replace('/(&[a-z0-9]+;|[^a-z0-9_])/', '_', $string);
$string = preg_replace('/[\s_]+/', '_', $string);
$string = trim($string, '_');
return $string;
}
}