Index: wp-includes/formatting.php
===================================================================
--- wp-includes/formatting.php	(revision 12503)
+++ wp-includes/formatting.php	(working copy)
@@ -2841,12 +2841,17 @@
 	}
 
 	$match = array();
+	$found = false;
 	while ( preg_match('/%[a-f0-9]{2}/i', $filtered, $match) ) {
 		$filtered = str_replace($match[0], '', $filtered);
+		$found = true;
 	}
-	// Strip out the whitespace that may now exist after removing the octets.
-	$filtered = trim( preg_replace('/[\r\n\t ]+/', ' ', $filtered) );
 
+	if ( $found ) {
+		// Strip out the whitespace that may now exist after removing the octets.
+		$filtered = trim( preg_replace('/ +/', ' ', $filtered) );
+	}
+
 	return apply_filters('sanitize_text_field', $filtered, $str);
 }
 
