From 7318490e2c3cd1846c5f6a36f4debd92bf8f387b Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Mon, 14 Nov 2005 10:14:43 +0000 Subject: [PATCH] Cut international trackbacks, fixes #1647 git-svn-id: https://develop.svn.wordpress.org/trunk@3081 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-trackback.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-trackback.php b/wp-trackback.php index e6717102ad..a2c2d07846 100644 --- a/wp-trackback.php +++ b/wp-trackback.php @@ -70,7 +70,10 @@ if ( !empty($tb_url) && !empty($title) && !empty($tb_url) ) { $title = wp_specialchars( strip_tags( $title ) ); $title = (strlen($title) > 250) ? substr($title, 0, 250) . '...' : $title; $excerpt = strip_tags($excerpt); - $excerpt = (strlen($excerpt) > 255) ? substr($excerpt, 0, 252) . '...' : $excerpt; + if ( function_exists('mb_strcut') ) // For international trackbacks + $excerpt = mb_strcut($excerpt, 0, 252, get_settings('blog_charset')) . '...'; + else + $excerpt = (strlen($excerpt) > 255) ? substr($excerpt, 0, 252) . '...' : $excerpt; $comment_post_ID = $tb_id; $comment_author = $blog_name;