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.


Built from https://develop.svn.wordpress.org/trunk@32858


git-svn-id: http://core.svn.wordpress.org/trunk@32829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Konstantin Obenland 2015-06-19 14:15:26 +00:00
parent 4e7c057a5a
commit 898bb2ed34
2 changed files with 3 additions and 4 deletions

View File

@ -2195,7 +2195,6 @@ function wp_list_comments( $args = array(), $comments = null ) {
* @type string $comment_notes_before HTML element for a message displayed before the comment form.
* Default 'Your email address will not be published.'.
* @type string $comment_notes_after HTML element for a message displayed after the comment form.
* Default 'You may use these HTML tags and attributes ...'.
* @type string $id_form The comment form element id attribute. Default 'commentform'.
* @type string $id_submit The comment submit element id attribute. Default 'submit'.
* @type string $class_submit The comment submit element class attribute. Default 'submit'.
@ -2251,13 +2250,13 @@ function comment_form( $args = array(), $post_id = null ) {
$fields = apply_filters( 'comment_form_default_fields', $fields );
$defaults = array(
'fields' => $fields,
'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>',
'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>',
/** This filter is documented in wp-includes/link-template.php */
'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>',
/** This filter is documented in wp-includes/link-template.php */
'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>',
'comment_notes_before' => '<p class="comment-notes"><span id="email-notes">' . __( 'Your email address will not be published.' ) . '</span>'. ( $req ? $required_text : '' ) . '</p>',
'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>',
'comment_notes_after' => '',
'id_form' => 'commentform',
'id_submit' => 'submit',
'class_submit' => 'submit',

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-alpha-32857';
$wp_version = '4.3-alpha-32858';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.