From 8c13f286e36b7b8d9f2fd7b920d5aa3f95aabc9d Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Fri, 14 Sep 2012 19:32:53 +0000 Subject: [PATCH] Use the non-slashing variants of kses functions in sanitize_option() to avoid slash ping pong. fixes #21892. git-svn-id: https://develop.svn.wordpress.org/trunk@21850 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/formatting.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 6d78eddeb7..43c5ad00af 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -2789,9 +2789,7 @@ function sanitize_option($option, $value) { case 'blogdescription': case 'blogname': - $value = addslashes($value); - $value = wp_filter_post_kses( $value ); // calls stripslashes then addslashes - $value = stripslashes($value); + $value = wp_kses_post( $value ); $value = esc_html( $value ); break; @@ -2807,9 +2805,7 @@ function sanitize_option($option, $value) { case 'ping_sites': case 'upload_path': $value = strip_tags($value); - $value = addslashes($value); - $value = wp_filter_kses($value); // calls stripslashes then addslashes - $value = stripslashes($value); + $value = wp_kses_data($value); break; case 'gmt_offset':