[eluser]Unknown[/eluser]
áéíóú - ÁÉÍÓÚ characters do not adequately replace...
return preg_replace('/('.preg_quote($phrase, '/').')/
ui', $tag_open."\\1".$tag_close, $str);
Code:
function highlight_phrase($str, $phrase, $tag_open = '<strong>', $tag_close = '</strong>')
{
if ($str == '')
{
return '';
}
if ($phrase != '')
{
return preg_replace('/('.preg_quote($phrase, '/').')/ui', $tag_open."\\1".$tag_close, $str);
}
return $str;
}
In config.php file(to accept any character on URL):
Code:
$config['permitted_uri_chars'] = utf8_encode('áéíóúÁÉÍÓÚäëïöüÄËÏÖÜñÑ a-z 0-9~%.:_\-+*');