From cd0641c85659730821ce35271d7bd1aad5aa79df Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@7690 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 5609e6fc62..b402dbd8c6 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);