I am using THE PERFECT PHP CLEAN URL GENERATOR from http://cubiq.org/the-perfect-php-clean-url-generator
public static function create($clean, $delimiter='-') {
echo $clean;
$clean = iconv('UTF-8', 'ASCII//TRANSLIT', $clean);
$clean = preg_replace("/[^a-zA-Z0-9\/_|+ -]/", '', $clean);
$clean = strtolower(trim($clean, '-'));
$clean = preg_replace("/[\/_|+ -]+/", $delimiter, $clean);
echo $clean;
return $clean;
}
to clean a name field being posted from a form now for some reason when I set the clean varible to “Hi! I’m the title of your page!” it gives me back hi-im-the-title-of-your-page which is to be expected but if I grab the clean variable from a post it goes in as “Hi! I’m the title of your page!” but comes out as hi-i039m-the-title-of-your-page is there anyway to fix this? Is there something I am not understanding?
Somewhere in your code the string is html encoded which turns ’ to #039; then at following step
characters # and ; are stripped and you end up with 039