Make WordPress Core


Ignore:
Timestamp:
09/15/2012 08:01:08 PM (12 years ago)
Author:
nacin
Message:

Add Pinyin diacritics to remove_accents(). Remove these diacritics in sanitize_title_with_dashes() on save as well. props bolo1988, SergeyBiryukov. fixes #20772.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/formatting.php

    r21851 r21859  
    770770        chr(225).chr(187).chr(176) => 'U', chr(225).chr(187).chr(177) => 'u',
    771771        chr(225).chr(187).chr(180) => 'Y', chr(225).chr(187).chr(181) => 'y',
     772        // Vowels with diacritic (Chinese, Hanyu Pinyin)
     773        chr(201).chr(145) => 'a',
     774        // macron
     775        chr(199).chr(149) => 'U', chr(199).chr(150) => 'u',
     776        // acute accent
     777        chr(199).chr(151) => 'U', chr(199).chr(152) => 'u',
     778        // caron
     779        chr(199).chr(141) => 'A', chr(199).chr(142) => 'a',
     780        chr(199).chr(143) => 'I', chr(199).chr(144) => 'i',
     781        chr(199).chr(145) => 'O', chr(199).chr(146) => 'o',
     782        chr(199).chr(147) => 'U', chr(199).chr(148) => 'u',
     783        chr(199).chr(153) => 'U', chr(199).chr(154) => 'u',
     784        // grave accent
     785        chr(199).chr(155) => 'U', chr(199).chr(156) => 'u',
    772786        );
    773787
     
    9861000            // copy, reg, deg, hellip and trade
    9871001            '%c2%a9', '%c2%ae', '%c2%b0', '%e2%80%a6', '%e2%84%a2',
     1002            // grave accent, acute accent, macron, caron
     1003            '%cc%80', '%cc%81', '%cc%84', '%cc%8c',
    9881004        ), '', $title );
    9891005
Note: See TracChangeset for help on using the changeset viewer.