WordPress.org

Make WordPress Core

Changeset 16357


Ignore:
Timestamp:
11/13/2010 10:30:36 PM (8 years ago)
Author:
scribu
Message:

Always apply comment_text filter in check_comment(). Props hakre. Fixes #14680

File:
1 edited

Legend:

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

    r16353 r16357  
    4646        return false; // If moderation is set to manual
    4747
     48    $comment = apply_filters( 'comment_text', $comment );
     49
    4850    // Check # of external links
    4951    if ( $max_links = get_option( 'comment_max_links' ) ) {
    50         $num_links = preg_match_all( '/<a [^>]*href/i', apply_filters( 'comment_text', $comment ), $out );
     52        $num_links = preg_match_all( '/<a [^>]*href/i', $comment, $out );
    5153        $num_links = apply_filters( 'comment_max_links_url', $num_links, $url ); // provide for counting of $url as a link
    5254        if ( $num_links >= $max_links )
Note: See TracChangeset for help on using the changeset viewer.