From f28dad826114cf5d5607c5fc6b7c4dd9344af23c Mon Sep 17 00:00:00 2001 From: markjaquith Date: Wed, 1 Aug 2007 19:24:51 +0000 Subject: [PATCH] Sanitize option names in option.php, use current escaping functions. for trunk git-svn-id: http://svn.automattic.com/wordpress/trunk@5832 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/options.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/wp-admin/options.php b/wp-admin/options.php index f6b6880ed..c4dc44509 100644 --- a/wp-admin/options.php +++ b/wp-admin/options.php @@ -56,10 +56,11 @@ $options = $wpdb->get_results("SELECT * FROM $wpdb->options ORDER BY option_name foreach ( (array) $options as $option) : $disabled = ''; + $option->option_name = attribute_escape($option->option_name); if ( is_serialized($option->option_value) ) { if ( is_serialized_string($option->option_value) ) { // this is a serialized string, so we should display it - $value = wp_specialchars(maybe_unserialize($option->option_value), 'single'); + $value = maybe_unserialize($option->option_value); $options_to_update[] = $option->option_name; $class = 'all-options'; } else { @@ -68,7 +69,7 @@ foreach ( (array) $options as $option) : $class = 'all-options disabled'; } } else { - $value = wp_specialchars($option->option_value, 'single'); + $value = $option->option_value; $options_to_update[] = $option->option_name; $class = 'all-options'; } @@ -77,8 +78,8 @@ foreach ( (array) $options as $option) : "; - if (strpos($value, "\n") !== false) echo ""; - else echo ""; + if (strpos($value, "\n") !== false) echo ""; + else echo ""; echo " $option->option_description @@ -87,7 +88,7 @@ endforeach; ?> -

+