Quote:
Originally Posted by liotier Since the database record itself is mangled, I guessed after reading a few threads that the answer may have something to do with libs/utils.php. I found that "é" and "ç" were both missing from the list of "$output = str_replace" character replacements around line 260 of libs/utils.php. Can that be the cause of my problem ? |
Reflecting on that solution I thought that it would not work : the function I am talking about is named makeUrlFriendly() whereas my problem is sanitizing the title, not the URL.
But then more grepping led me to discover that this function is used in templates/yget/submit_step_3.tpl at line 58 to sanitize the title so that it can be used in the story's URL :
PHP Code:
$linkres->title_url = makeUrlFriendly($linkres->title);
So I modified libs/utils.php so that makeUrlFriendly() supports my problematic accents :
PHP Code:
276a277,281
> $output = str_replace("é", "e", $output);
> $output = str_replace("è", "e", $output);
> $output = str_replace("ç", "c", $output);
> $output = str_replace("ù", "u", $output);
> $output = str_replace("à", "a", $output);
A few tests later I confirmed that I have solved my problem.
Now, can anyone add that in the dev tree ?