WordPress.org

Make WordPress Core

Ticket #29573: 29573.patch

File 29573.patch, 687 bytes (added by SergeyBiryukov, 5 years ago)
  • src/wp-admin/includes/post.php

     
    12071207        } else {
    12081208                if ( function_exists( 'mb_strlen' ) && mb_strlen( $post_name ) > 30 ) {
    12091209                        $post_name_abridged = mb_substr( $post_name, 0, 14 ) . '…' . mb_substr( $post_name, -14 );
    1210                 } elseif ( strlen( $post_name ) > 30 ) {
     1210                } elseif ( ! seems_utf8( $post_name ) && strlen( $post_name ) > 30 ) {
    12111211                        $post_name_abridged = substr( $post_name, 0, 14 ) . '…' . substr( $post_name, -14 );
    12121212                } else {
    12131213                        $post_name_abridged = $post_name;