[wp-trac] [WordPress Trac] #27071: Invalid HTML produced by get_the_password_form

WordPress Trac noreply at wordpress.org
Sat Feb 8 12:15:44 UTC 2014


#27071: Invalid HTML produced by get_the_password_form
-------------------------------+-----------------------------
 Reporter:  andykeith          |      Owner:
     Type:  defect (bug)       |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Posts, Post Types  |    Version:  3.8.1
 Severity:  normal             |   Keywords:
  Focuses:                     |
-------------------------------+-----------------------------
 There seems to be a bug with the HTML returned by get_the_password_form
 (post-template.php). There's a line break between lines 1251 and 1252 (the
 closing </p> tag surrounding the input and the closing </form> tag). This
 causes an extra </p> to be generated by the browser. So the output on a
 password-proteced post looks like this:

 {{{
 <form action="http://localhost/themedev/wp-login.php?action=postpass"
 class="post-password-form" method="post">
 <p>This content is password protected. To view it please enter your
 password below:</p>
 <p><label for="pwbox-611">Password: <input name="post_password"
 id="pwbox-611" type="password" size="20" /></label> <input type="submit"
 name="Submit" value="Submit" /></p>
 </p></form>
 }}}

 Simple fix - just need to remove this line break and it works fine.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27071>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list