Index: wp-includes/formatting.php
===================================================================
--- wp-includes/formatting.php	(revision 24001)
+++ wp-includes/formatting.php	(working copy)
@@ -3347,7 +3347,7 @@ function sanitize_trackback_urls( $to_ping ) {
 }
 
 /**
- * Add slashes to a string or array of strings.
+ * Add slashes to a string or array of strings, in recursive manner.
  *
  * This should be used when preparing data for core API that expects slashed data.
  * This should not be used to escape data going directly into an SQL query.
@@ -3358,17 +3358,10 @@ function sanitize_trackback_urls( $to_ping ) {
  * @return string|array Slashed $value
  */
 function wp_slash( $value ) {
-	if ( is_array( $value ) ) {
-		foreach ( $value as $k => $v ) {
-			if ( is_array( $v ) ) {
-				$value[$k] = wp_slash( $v );
-			} else {
-				$value[$k] = addslashes( $v );
-			}
-		}
-	} else {
+	if ( is_array( $value ) )
+		$value = array_map( 'wp_slash', $value );
+	else
 		$value = addslashes( $value );
-	}
 
 	return $value;
 }
