[wp-trac] [WordPress Trac] #42661: html5 comments form validation doesn't work
WordPress Trac
noreply at wordpress.org
Wed Nov 22 11:44:25 UTC 2017
#42661: html5 comments form validation doesn't work
--------------------------+-----------------------------
Reporter: Wordpreso | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.9
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
The default html5 validation doesn't work in the forms build by /wp-
includes/comment-template.php
in the function comment_form( $args = array(), $post_id = null )
in the line 2298 of comment-template.php the sentence to create novalidate
atribute has the values reversed and because of this it isn't going to
validate in html5 forms :
{{{#!php
<?php
<form action="<?php echo esc_url( $args['action'] ); ?>" method="post"
id="<?php echo esc_attr( $args['id_form'] ); ?>" class="<?php echo
esc_attr( $args['class_form'] ); ?>"<?php echo $html5 ? ' novalidate' :
''; ?>>
}}}
This sentence shouldn't be? :
{{{#!php
<?php
<form action="<?php echo esc_url( $args['action'] ); ?>" method="post"
id="<?php echo esc_attr( $args['id_form'] ); ?>" class="<?php echo
esc_attr( $args['class_form'] ); ?>"<?php echo $html5 ? '' : 'novalidate';
?>>
}}}
¿Or are you delegating this kind of validations to any other source code?
in such case what sense have print or not this attribute here?
I attach the file with the correction from a previous versión but the bug,
if it is a bug is in 4.9 source code too.
Thanks for reading and thanks for wordpress ;-)
Best regards
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42661>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list