diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php
index b87844b..4fc4941 100644
--- a/wp-includes/comment-template.php
+++ b/wp-includes/comment-template.php
@@ -506,20 +506,35 @@ function comment_date( $d = '', $comment_ID = 0 ) {
  */
 function get_comment_excerpt( $comment_ID = 0 ) {
 	$comment = get_comment( $comment_ID );
-	$comment_text = strip_tags($comment->comment_content);
-	$blah = explode(' ', $comment_text);
-	if (count($blah) > 20) {
-		$k = 20;
-		$use_dotdotdot = 1;
+	$comment_text = strip_tags( str_replace( array( "\n", "\r" ), ' ', $comment->comment_content ) );
+	$words = explode( ' ', $comment_text );
+	$excerpt = '';
+	$excerpt_parts = array();
+
+	/**
+	 * Filter the amount of words used in the comment excerpt.
+	 *
+	 * @since 3.9
+	 *
+	 * @param int $comment_excerpt_length The amount of words you want to display in the comment excerpt.
+	 */
+	$comment_excerpt_length = apply_filters( 'comment_excerpt_length', 20 );
+
+	if ( count( $words ) > $comment_excerpt_length ) {
+		$k = $comment_excerpt_length;
+		$use_ellipsis = 1;
 	} else {
-		$k = count($blah);
-		$use_dotdotdot = 0;
+		$k = count( $words );
+		$use_ellipsis = 0;
 	}
-	$excerpt = '';
-	for ($i=0; $i<$k; $i++) {
-		$excerpt .= $blah[$i] . ' ';
+
+	for ( $i = 0; $i < $k; $i++ ) {
+		$excerpt_parts[] = $words[ $i ];
 	}
-	$excerpt .= ($use_dotdotdot) ? '&hellip;' : '';
+
+	$excerpt = implode( ' ', $excerpt_parts );
+	$excerpt .= ( 1 === $use_ellipsis ? '&hellip;' : '' );
+
 	return apply_filters('get_comment_excerpt', $excerpt);
 }
 
