Make WordPress Core

Changeset 32858


Ignore:
Timestamp:
06/19/2015 02:14:41 PM (9 years ago)
Author:
obenland
Message:

Remove allowed tags from comment form.

It can be confusing to users and for most it is not relevant.
Commenters comfortable with HTML will know which tags are likely
to be accepted.

Props krogsgard, rachelbaker.
Fixes #30157.

File:
1 edited

Legend:

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

    r32786 r32858  
    21962196 *                                        Default 'Your email address will not be published.'.
    21972197 *     @type string $comment_notes_after  HTML element for a message displayed after the comment form.
    2198  *                                        Default 'You may use these HTML tags and attributes ...'.
    21992198 *     @type string $id_form              The comment form element id attribute. Default 'commentform'.
    22002199 *     @type string $id_submit            The comment submit element id attribute. Default 'submit'.
     
    22522251    $defaults = array(
    22532252        'fields'               => $fields,
    2254         'comment_field'        => '<p class="comment-form-comment"><label for="comment">' . _x( 'Comment', 'noun' ) . '</label> <textarea id="comment" name="comment" cols="45" rows="8" aria-describedby="form-allowed-tags" aria-required="true" required="required"></textarea></p>',
     2253        'comment_field'        => '<p class="comment-form-comment"><label for="comment">' . _x( 'Comment', 'noun' ) . '</label> <textarea id="comment" name="comment" cols="45" rows="8" aria-required="true" required="required"></textarea></p>',
    22552254        /** This filter is documented in wp-includes/link-template.php */
    22562255        'must_log_in'          => '<p class="must-log-in">' . sprintf( __( 'You must be <a href="%s">logged in</a> to post a comment.' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>',
     
    22582257        'logged_in_as'         => '<p class="logged-in-as">' . sprintf( __( 'Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>' ), get_edit_user_link(), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>',
    22592258        'comment_notes_before' => '<p class="comment-notes"><span id="email-notes">' . __( 'Your email address will not be published.' ) . '</span>'. ( $req ? $required_text : '' ) . '</p>',
    2260         'comment_notes_after'  => '<p class="form-allowed-tags" id="form-allowed-tags">' . sprintf( __( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s' ), ' <code>' . allowed_tags() . '</code>' ) . '</p>',
     2259        'comment_notes_after'  => '',
    22612260        'id_form'              => 'commentform',
    22622261        'id_submit'            => 'submit',
Note: See TracChangeset for help on using the changeset viewer.