From 3a66c698ee00d2e6f6c24595932e379a5d20d2c5 Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 16 Dec 2010 17:48:20 +0000 Subject: [PATCH] Remove some unnecessary esc_textarea() calls. Props garyc40. see #15454 git-svn-id: http://svn.automattic.com/wordpress/trunk@17001 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-tag-form.php | 2 +- wp-admin/includes/media.php | 5 ++++- wp-admin/includes/meta-boxes.php | 4 ++-- wp-includes/formatting.php | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/wp-admin/edit-tag-form.php b/wp-admin/edit-tag-form.php index dbf669ffe1..1598a6285e 100644 --- a/wp-admin/edit-tag-form.php +++ b/wp-admin/edit-tag-form.php @@ -61,7 +61,7 @@ do_action($taxonomy . '_pre_edit_form', $tag, $taxonomy); ?> -
+
" . esc_textarea( $field['value'] ) . ''; + if ( user_can_richedit() ) { // already escaped when user_can_richedit() = false + $field['value'] = esc_textarea( $field['value'] ); + } + $item .= "'; } else { $item .= ""; } diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php index 42678db92d..96466b5743 100644 --- a/wp-admin/includes/meta-boxes.php +++ b/wp-admin/includes/meta-boxes.php @@ -288,7 +288,7 @@ function post_tags_meta_box($post, $box) {

labels->add_or_remove_items; ?>

-
+
cap->assign_terms) ) : ?>
@@ -892,7 +892,7 @@ function link_advanced_meta_box($link) { - + diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index c34c4f1617..718ad71a78 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -1126,7 +1126,7 @@ function force_balance_tags( $text ) { function format_to_edit($content, $richedit = false) { $content = apply_filters('format_to_edit', $content); if (! $richedit ) - $content = htmlspecialchars($content); + $content = esc_textarea($content); return $content; }