Opened 13 years ago
Closed 12 years ago
#27071 closed defect (bug) (fixed)
Invalid HTML produced by get_the_password_form
| Reported by: | andykeith | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.8.2 |
| Component: | Posts, Post Types | Version: | 3.7 |
| Severity: | normal | Keywords: | has-patch commit fixed-major needs-unit-tests |
| Cc: | Focuses: |
Description
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.
Attachments (1)
Change History (6)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Confirmed. It's not the line break, it's the extra tab. [25010] accidentally reverted [21124] and reintroduced #21018.
We should probably look into
wpautop()(see ticket:21018:1 and ticket:21018:21018.diff), but at least let's fix the regression here.