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
This commit is contained in:
parent
97cfa272b0
commit
cd0641c856
|
@ -570,7 +570,7 @@ function wp_get_current_commenter() {
|
||||||
*/
|
*/
|
||||||
function wp_insert_comment($commentdata) {
|
function wp_insert_comment($commentdata) {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
extract($commentdata, EXTR_SKIP);
|
extract(stripslashes_deep($commentdata), EXTR_SKIP);
|
||||||
|
|
||||||
if ( ! isset($comment_author_IP) )
|
if ( ! isset($comment_author_IP) )
|
||||||
$comment_author_IP = '';
|
$comment_author_IP = '';
|
||||||
|
@ -767,7 +767,7 @@ function wp_update_comment($commentarr) {
|
||||||
$commentarr = wp_filter_comment( $commentarr );
|
$commentarr = wp_filter_comment( $commentarr );
|
||||||
|
|
||||||
// Now extract the merged array.
|
// Now extract the merged array.
|
||||||
extract($commentarr, EXTR_SKIP);
|
extract(stripslashes_deep($commentarr), EXTR_SKIP);
|
||||||
|
|
||||||
$comment_content = apply_filters('comment_save_pre', $comment_content);
|
$comment_content = apply_filters('comment_save_pre', $comment_content);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue