Danish characters sanitize in URL
-
Hi, I have a problem with sanitizing three special Danish characters in generated URLs. These characters are “?”, “?” and “?” and their uppercase version. When I enter some of these in post title, the character is left in URL as it is, but when I then on frontend click url with this character, it is not working.
Anyway, on some forum I found a way to solve this, and that is adding these few lines to function remove_accents() in formatting.php right at the top under “// Decompositions for Latin-1 Supplement”:
chr(195).chr(144) => 'D', chr(195).chr(176) => 'd', chr(195).chr(158) => 'TH', chr(195).chr(190) => 'th', chr(195).chr(134) => 'AE', chr(195).chr(166) => 'ae', chr(195).chr(133) => 'Aa', chr(195).chr(165) => 'aa', chr(195).chr(152) => 'Oe', chr(195).chr(184) => 'oe',
Still, I am modifying the core and so I would need to do this after each WordPress update. I was wondering if you could add this to a standard WordPress installation ? Thanks a lot
- The topic ‘Danish characters sanitize in URL’ is closed to new replies.