Ticket #23313: 23313.diff
| File 23313.diff, 1.4 KB (added by , 13 years ago) |
|---|
-
wp-includes/formatting.php
5 5 * Handles many functions for formatting output. 6 6 * 7 7 * @package WordPress 8 * */8 */ 9 9 10 10 /** 11 11 * Replaces common plain text characters into formatted entities … … 947 947 return $title; 948 948 } 949 949 950 function sanitize_title_for_query($title) { 951 return sanitize_title($title, '', 'query'); 950 /** 951 * Sanitizes title for use in a URL. 952 * 953 * @uses sanitize_title() 954 * 955 * @since 3.1 956 * 957 * @param string $title The string to be sanitized. 958 * @return string The sanitized string. 959 */ 960 function sanitize_title_for_query( $title ) { 961 return sanitize_title( $title, '', 'query' ); 952 962 } 953 963 954 964 /** … … 3176 3186 return '<' . $tag . $link . ' target="' . esc_attr( $_links_add_target ) . '">'; 3177 3187 } 3178 3188 3179 // normalize EOL characters and strip duplicate whitespace 3189 /** 3190 * Normalize EOL characters and strip duplicate whitespace. 3191 * 3192 * @since 2.7 3193 * 3194 * @param string $str 3195 * @return string 3196 */ 3180 3197 function normalize_whitespace( $str ) { 3181 $str = trim( $str);3182 $str = str_replace( "\r", "\n", $str);3198 $str = trim( $str ); 3199 $str = str_replace( "\r", "\n", $str ); 3183 3200 $str = preg_replace( array( '/\n+/', '/[ \t]+/' ), array( "\n", ' ' ), $str ); 3184 3201 return $str; 3185 3202 }