Index: /Users/amaury/Desktop/SVN/WPtrunk/wp-includes/formatting.php
===================================================================
--- /Users/amaury/Desktop/SVN/WPtrunk/wp-includes/formatting.php	(revision 13998)
+++ /Users/amaury/Desktop/SVN/WPtrunk/wp-includes/formatting.php	(working copy)
@@ -1798,16 +1798,38 @@
  */
 function wp_trim_excerpt($text) {
 	$raw_excerpt = $text;
-	if ( '' == $text ) {
-		$text = get_the_content('');
+	if ( empty($text) ) {
+		$text = wp_trim_text( get_the_content(''), apply_filters('excerpt_length', 55), apply_filters('excerpt_more', ' ' . '[...]'), false );
+	}
+	return apply_filters('wp_trim_excerpt', $text, $raw_excerpt);
+}
 
-		$text = strip_shortcodes( $text );
+/**
+ * Limit the length of a text
+ *
+ * The trimed text amount will be 55 words and if the amount is greater than
+ * that, then the string ' [...]' will be appended to the trimed text. If the text
+ * is less than 55 words, then the text filtered will be returned as is.
+ *
+ * @since 3.0.0
+ *
+ * @param string $text The text to trim.
+ * @param string $excerpt_length The lenght of words.
+ * @param string $excerpt_more The suffix append to the text.
+ * @param string $filtered_content Flag for active/deactive wordpress filtering content.
+ * @return string The text trimed.
+ */
+function wp_trim_text( $text = '', $excerpt_length = 55, $excerpt_more = '[...]', $filtered_content = false ) {
+	$raw_excerpt = $text;
+	if ( !empty($text) ) {	
+		if ( $filtered_content == false ) {
+			$text = strip_shortcodes( $text );
 
-		$text = apply_filters('the_content', $text);
-		$text = str_replace(']]>', ']]&gt;', $text);
-		$text = strip_tags($text);
-		$excerpt_length = apply_filters('excerpt_length', 55);
-		$excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');
+			$text = apply_filters('the_content', $text);
+			$text = str_replace(']]>', ']]&gt;', $text);
+			$text = strip_tags($text);
+		}
+		
 		$words = preg_split("/[\n\r\t ]+/", $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY);
 		if ( count($words) > $excerpt_length ) {
 			array_pop($words);
@@ -1817,7 +1839,8 @@
 			$text = implode(' ', $words);
 		}
 	}
-	return apply_filters('wp_trim_excerpt', $text, $raw_excerpt);
+	
+	return apply_filters('wp_trim_text', $text, $raw_excerpt);
 }
 
 /**
