Make WordPress Core


Ignore:
Timestamp:
06/15/2012 04:53:15 PM (14 years ago)
Author:
nacin
Message:

Don't allow unfiltered HTML comments from a frame. fixes #20812 for the 3.3 branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3/wp-includes/comment-template.php

    r19284 r21082  
    817817        $post_id = $post->ID;
    818818
    819     if ( current_user_can('unfiltered_html') )
    820         wp_nonce_field('unfiltered-html-comment_' . $post_id, '_wp_unfiltered_html_comment', false);
     819    if ( current_user_can( 'unfiltered_html' ) ) {
     820        wp_nonce_field( 'unfiltered-html-comment_' . $post_id, '_wp_unfiltered_html_comment_disabled', false );
     821        echo "<script>(function(){if(window===window.parent){document.getElementById('_wp_unfiltered_html_comment_disabled').name='_wp_unfiltered_html_comment';}})();</script>\n";
     822    }
    821823}
    822824
Note: See TracChangeset for help on using the changeset viewer.