WordPress.org

Make WordPress Core

Changeset 12501


Ignore:
Timestamp:
12/23/2009 09:16:31 AM (12 years ago)
Author:
azaozz
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.9/wp-includes/formatting.php

    r12414 r12501  
    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.