Ticket #10823: 10823.3.diff
File 10823.3.diff, 1.3 KB (added by , 13 years ago) |
---|
-
wp-includes/formatting.php
821 821 $username = remove_accents( $username ); 822 822 // Kill octets 823 823 $username = preg_replace( '|%([a-fA-F0-9][a-fA-F0-9])|', '', $username ); 824 $username = preg_replace( '/& .+?;/', '', $username ); // Kill entities824 $username = preg_replace( '/&#?\w+;/', '', $username ); // Kill entities 825 825 826 826 // If strict, reduce to ASCII for max portability. 827 827 if ( $strict ) … … 905 905 // Restore octets. 906 906 $title = preg_replace('|---([a-fA-F0-9][a-fA-F0-9])---|', '%$1', $title); 907 907 908 if ( seems_utf8($title)) {909 if ( function_exists('mb_strtolower')) {910 $title = mb_strtolower( $title, 'UTF-8');911 } 912 $title = utf8_uri_encode( $title, 200);908 if ( seems_utf8( $title ) ) { 909 if ( function_exists( 'mb_strtolower' ) ) 910 $title = mb_strtolower( $title, 'UTF-8' ); 911 912 $title = utf8_uri_encode( $title, 200 ); 913 913 } 914 914 915 $title = strtolower( $title);916 $title = preg_replace( '/&.+?;/', '', $title); // kill entities917 $title = str_replace( '.', '-', $title);915 $title = strtolower( $title ); 916 $title = preg_replace( '/&#?\w+;/', '', $title ); // kill entities 917 $title = str_replace( '.', '-', $title ); 918 918 919 919 if ( 'save' == $context ) { 920 920 // nbsp, ndash and mdash