mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Faster remove accents. Props skeltoac. fixes #2978
git-svn-id: http://svn.automattic.com/wordpress/trunk@4050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4e7aacfc21
commit
45cacb257a
@ -149,6 +149,9 @@ function utf8_uri_encode( $utf8_string ) {
|
||||
}
|
||||
|
||||
function remove_accents($string) {
|
||||
if ( !preg_match('/[\x80-\xff]/', $string) )
|
||||
return $string;
|
||||
|
||||
if (seems_utf8($string)) {
|
||||
$chars = array(
|
||||
// Decompositions for Latin-1 Supplement
|
||||
|
Loading…
Reference in New Issue
Block a user