From ce1fed1a02da762c60c6efcea6f1753eafc74096 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 15 Apr 2008 18:05:08 +0000 Subject: [PATCH] Strip slashes before preparing comment insert to avoid double-slashing. Props filosofo. fixes #6738 git-svn-id: http://svn.automattic.com/wordpress/trunk@7690 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 5609e6fc6..b402dbd8c 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -570,7 +570,7 @@ function wp_get_current_commenter() { */ function wp_insert_comment($commentdata) { global $wpdb; - extract($commentdata, EXTR_SKIP); + extract(stripslashes_deep($commentdata), EXTR_SKIP); if ( ! isset($comment_author_IP) ) $comment_author_IP = ''; @@ -767,7 +767,7 @@ function wp_update_comment($commentarr) { $commentarr = wp_filter_comment( $commentarr ); // Now extract the merged array. - extract($commentarr, EXTR_SKIP); + extract(stripslashes_deep($commentarr), EXTR_SKIP); $comment_content = apply_filters('comment_save_pre', $comment_content);