Make WordPress Core

Changeset 13328


Ignore:
Timestamp:
02/23/2010 10:30:21 AM (15 years ago)
Author:
nacin
Message:

Don't show two ellipses in wp_widget_rss_output(). Fixes #11244 props miqrogroove

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/default-widgets.php

    r13276 r13328  
    806806            $title = __('Untitled');
    807807
    808         $desc = str_replace(array("\n", "\r"), ' ', esc_attr(strip_tags(@html_entity_decode($item->get_description(), ENT_QUOTES, get_option('blog_charset')))));
    809         $desc = wp_html_excerpt( $desc, 360 ) . ' […]';
     808        $desc = str_replace( array("\n", "\r"), ' ', esc_attr( strip_tags( @html_entity_decode( $item->get_description(), ENT_QUOTES, get_option('blog_charset') ) ) ) );
     809        $desc = wp_html_excerpt( $desc, 360 );
     810
     811        // Append ellipsis. Change existing [...] to […].
     812        if ( '[...]' == substr( $desc, -5 ) )
     813            $desc = substr( $desc, 0, -5 ) . '[…]';
     814        elseif ( '[…]' != substr( $desc, -10 ) )
     815            $desc .= ' […]';
     816
    810817        $desc = esc_html( $desc );
    811818
Note: See TracChangeset for help on using the changeset viewer.