]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/formatting.php
Wordpress 2.9.2-scripts
[autoinstalls/wordpress.git] / wp-includes / formatting.php
index 21f82d6d12cc1725276db2ba211a17035d3c9f95..dc9ed2f6cc4663f81855690bcdb04fd91f147ad3 100644 (file)
@@ -2810,7 +2810,7 @@ function wp_strip_all_tags($string, $remove_breaks = false) {
        $string = strip_tags($string);
 
        if ( $remove_breaks )
-               $string = preg_replace('/\s+/', ' ', $string);
+               $string = preg_replace('/[\r\n\t ]+/', ' ', $string);
 
        return trim($string);
 }
@@ -2836,7 +2836,7 @@ function sanitize_text_field($str) {
                $filtered = wp_pre_kses_less_than( $filtered );
                $filtered = wp_strip_all_tags( $filtered, true );
        } else {
-                $filtered = trim( preg_replace('/\s+/', ' ', $filtered) );
+                $filtered = trim( preg_replace('/[\r\n\t ]+/', ' ', $filtered) );
        }
 
        $match = array();