Changeset 12503
- Timestamp:
- 12/23/2009 09:52:48 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/formatting.php
r12499 r12503 2835 2835 if ( strpos($filtered, '<') !== false ) { 2836 2836 $filtered = wp_pre_kses_less_than( $filtered ); 2837 // This will strip extra whitespace for us. 2837 2838 $filtered = wp_strip_all_tags( $filtered, true ); 2838 2839 } else { 2839 2840 $filtered = trim( preg_replace('/[\r\n\t ]+/', ' ', $filtered) ); 2840 2841 } 2841 2842 2842 2843 $match = array(); 2843 while ( preg_match('/%[a-f0-9]{2}/i', $filtered, $match) ) 2844 while ( preg_match('/%[a-f0-9]{2}/i', $filtered, $match) ) { 2844 2845 $filtered = str_replace($match[0], '', $filtered); 2846 } 2847 // Strip out the whitespace that may now exist after removing the octets. 2848 $filtered = trim( preg_replace('/[\r\n\t ]+/', ' ', $filtered) ); 2845 2849 2846 2850 return apply_filters('sanitize_text_field', $filtered, $str);
Note: See TracChangeset
for help on using the changeset viewer.