Ticket #4605 (closed defect (bug): wontfix)
input tags misformatted
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 2.2.1 |
| Severity: | normal | Keywords: | has-patch 2nd-opinion formatting forms input br |
| Cc: |
Description
I tried creating a form in a page - but the formatting is not working properly.
When I enter, for example:
Your name: <input name="submittername" type="text"/><br /> Your E-mail address: <input name="submitteremail" type="text" />
wordpress then modifies it to look like this when you view the page:
name:<br /> <input name="submittername" type="text"/> Your E-mail address:<br /> <input name="submitteremail" type="text" />
It's putting in a br tag before each input tag, and not putting them in where I actually made line breaks.
Note that the code is not actually being altered - if I edit it again, I see the original code I wrote. It's just when it's rendered for viewing the page that I get the modified version.
Also, I'm not using the visual editor at all - it's disabled in my profile - so I don't imagine it could be at fault here.
Attachments
Change History
Take a look here as well: http://trac.wordpress.org/ticket/4716
This seems to be related to this Issue in some kind and gives an additional insight in <br/> and form element related issues. (WP 2.2.2)
But it might cause the Problem I was reporting there as well. I have now removed INPUT from that list and now this turns out very well in my reported problem.
<hr> should be removed there as well as <select> and <style>. additionally it would make sense to sort this alphabetically for a better overview.
I made a patch against current svn.
-
attachment
blockelements.patch
added
(x)html-block-elements-name cleanup and sort
- Keywords formatting forms input has-patch added; formatting, forms, input, removed

For some reason, "input" is part of the $allblocks list in wpautop() in formatting.php... Which is odd, because input is an inline element, not a block element. I think that input should be removed from that list.