Make WordPress Core

Changeset 31264


Ignore:
Timestamp:
01/21/2015 11:17:08 PM (9 years ago)
Author:
pento
Message:

Comments: When a comment fails to insert, remove invalid characters from the email and URL fields, too.

See [31263], #21212

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/comment.php

    r31263 r31264  
    19261926    $compacted = compact( 'comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_author_IP', 'comment_date', 'comment_date_gmt', 'comment_content', 'comment_karma', 'comment_approved', 'comment_agent', 'comment_type', 'comment_parent', 'user_id' );
    19271927    if ( ! $wpdb->insert( $wpdb->comments, $compacted ) ) {
    1928         $fields = array( 'comment_author', 'comment_content' );
     1928        $fields = array( 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content' );
    19291929
    19301930        foreach( $fields as $field ) {
Note: See TracChangeset for help on using the changeset viewer.