WordPress.org

Make WordPress Core

Ticket #21448: 21448.patch

File 21448.patch, 821 bytes (added by nerrad, 21 months ago)

fix for name property = null

  • wp-includes/comment-template.php

     
    818818 
    819819        if ( current_user_can( 'unfiltered_html' ) ) { 
    820820                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"; 
     821                echo "<script>(function(){var comment_disabled = document.getElementById('_wp_unfiltered_html_comment_disabled'); if(window===window.parent && comment_disabled !== null){comment_disabled.name='_wp_unfiltered_html_comment';}})();</script>\n"; 
    822822        } 
    823823} 
    824824