Make WordPress Core

Ticket #26520: 26520.patch

File 26520.patch, 788 bytes (added by SergeyBiryukov, 13 years ago)
  • src/wp-includes/default-widgets.php

     
    866866                if ( empty($title) )
    867867                        $title = __('Untitled');
    868868
    869                 $desc = str_replace( array("\n", "\r"), ' ', esc_attr( strip_tags( @html_entity_decode( $item->get_description(), ENT_QUOTES, get_option('blog_charset') ) ) ) );
     869                $desc = @html_entity_decode( $item->get_description(), ENT_QUOTES, get_option( 'blog_charset' ) );
     870                $desc = esc_attr( strip_tags( $desc ) );
     871                $desc = trim( str_replace( array( "\n", "\r" ), ' ', $desc ) );
    870872                $excerpt = wp_html_excerpt( $desc, 360 );
    871873
    872874                // Append ellipsis. Change existing [...] to […].