WordPress.org

Make WordPress Core

Changeset 12499


Ignore:
Timestamp:
12/23/09 09:10:26 (4 years ago)
Author:
azaozz
Message:

Fix sanitize_text_field() issue with some UTF-8 characters, fixes #11528 for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/formatting.php

    r12460 r12499  
    28112811 
    28122812    if ( $remove_breaks ) 
    2813         $string = preg_replace('/\s+/', ' ', $string); 
     2813        $string = preg_replace('/[\r\n\t ]+/', ' ', $string); 
    28142814 
    28152815    return trim($string); 
     
    28372837        $filtered = wp_strip_all_tags( $filtered, true ); 
    28382838    } else { 
    2839          $filtered = trim( preg_replace('/\s+/', ' ', $filtered) ); 
     2839         $filtered = trim( preg_replace('/[\r\n\t ]+/', ' ', $filtered) ); 
    28402840    } 
    28412841 
Note: See TracChangeset for help on using the changeset viewer.