Ticket #11446: 11446.diff
File 11446.diff, 820 bytes (added by , 14 years ago) |
---|
-
wp-includes/formatting.php
2713 2713 * @return string The excerpt. 2714 2714 */ 2715 2715 function wp_html_excerpt( $str, $count ) { 2716 $ str = wp_strip_all_tags( $str, true );2717 $ str = mb_substr( $str, 0, $count );2716 $new_str = wp_strip_all_tags( $str, true ); 2717 $new_str = mb_substr( $new_str, 0, $count ); 2718 2718 // remove part of an entity at the end 2719 $str = preg_replace( '/&[^;\s]{0,6}$/', '', $str ); 2720 return $str; 2719 $new_str = preg_replace( '/&[^;\s]{0,6}$/', '', $new_str ); 2720 if( strlen( $new_str ) < strlen( $str ) ) 2721 $new_str .= '…'; 2722 return $new_str; 2721 2723 } 2722 2724 2723 2725 /** … … 2899 2901 2900 2902 } 2901 2903 2902 ?> 2904 ?> 2905 No newline at end of file