Use wp_html_excerpt() instead of substr in rss widget. Props nbachiyski. fixes #8278
git-svn-id: https://develop.svn.wordpress.org/trunk@9791 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
54c776ba72
commit
03d0787b0a
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '2.7-beta3-9771';
|
$wp_version = '2.7-beta3-9791';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
@ -1578,7 +1578,7 @@ function wp_widget_rss_output( $rss, $args = array() ) {
|
|||||||
elseif ( isset( $item['summary'] ) && is_string( $item['summary'] ) )
|
elseif ( isset( $item['summary'] ) && is_string( $item['summary'] ) )
|
||||||
$desc = str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags(html_entity_decode($item['summary'], ENT_QUOTES))));
|
$desc = str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags(html_entity_decode($item['summary'], ENT_QUOTES))));
|
||||||
if ( 360 < strlen( $desc ) )
|
if ( 360 < strlen( $desc ) )
|
||||||
$desc = substr( $desc, 0, 360 ) . ' […]';
|
$desc = wp_html_excerpt( $desc, 360 ) . ' […]';
|
||||||
$summary = $desc;
|
$summary = $desc;
|
||||||
|
|
||||||
if ( $show_summary ) {
|
if ( $show_summary ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user