Ticket #24106: 24106.patch
| File 24106.patch, 1.0 KB (added by , 13 years ago) |
|---|
-
wp-includes/formatting.php
function sanitize_trackback_urls( $to_ping ) { 3347 3347 } 3348 3348 3349 3349 /** 3350 * Add slashes to a string or array of strings .3350 * Add slashes to a string or array of strings, in recursive manner. 3351 3351 * 3352 3352 * This should be used when preparing data for core API that expects slashed data. 3353 3353 * This should not be used to escape data going directly into an SQL query. … … function sanitize_trackback_urls( $to_ping ) { 3358 3358 * @return string|array Slashed $value 3359 3359 */ 3360 3360 function wp_slash( $value ) { 3361 if ( is_array( $value ) ) { 3362 foreach ( $value as $k => $v ) { 3363 if ( is_array( $v ) ) { 3364 $value[$k] = wp_slash( $v ); 3365 } else { 3366 $value[$k] = addslashes( $v ); 3367 } 3368 } 3369 } else { 3361 if ( is_array( $value ) ) 3362 $value = array_map( 'wp_slash', $value ); 3363 else 3370 3364 $value = addslashes( $value ); 3371 }3372 3365 3373 3366 return $value; 3374 3367 }