Welcome Guest, Not a member yet? Register   Sign In
url_title bug
#3

[eluser]marcoss[/eluser]
[quote author="yello" date="1191796655"]The url_title() function does not work with characters with accents

Trois Riviéres -> trois-rivires

It removes the character instead of replacing "é" with "e"... the same thing happens with other characters with accents.[/quote]

This is what i use,
Code:
function replace_accents($str) {
        $str = htmlentities($str, ENT_COMPAT, "UTF-8");
        $str = preg_replace('/&([a-zA-Z])(uml|acute|grave|circ|tilde);/','$1',$str);
        return html_entity_decode($str);
    }


Messages In This Thread
url_title bug - by El Forum - 10-07-2007, 11:37 AM
url_title bug - by El Forum - 10-07-2007, 01:28 PM
url_title bug - by El Forum - 10-07-2007, 05:30 PM



Theme © iAndrew 2016 - Forum software by © MyBB