Opened 15 years ago
Closed 10 years ago
#10645 closed defect (bug) (worksforme)
auto_p and forms
Reported by: | kingjeffrey | Owned by: | |
---|---|---|---|
Milestone: | Priority: | low | |
Severity: | normal | Version: | |
Component: | Formatting | Keywords: | wpautop |
Focuses: | Cc: |
Description
auto_p will errantly injects paragraph and linebreak tags in certain circumstances within forms:
`<div>
<label for="select_element">This is a select box placed <select name="select_element"><option value="1">inline</option</select> with the label.</label>
</div>`
becomes:
`<div>
<label for="select_element">This is a select box that is placed<br />
<select name="select_element"><option value="1">inline</option><option value="2">inside</option><option value="3">within</option></select>
<p>inline with the label.</label>
</div>`
linebreak and paragraph tags should never be inserted inside a label. In this case they are not even properly paired. It would be nice if the surrounding div was identified and no tags were inserted, although if a paragraph tag wrapped the whole thing, it would not be the end of the world.
Change History (6)
#3
@
15 years ago
- Keywords wpautop added
- Milestone changed from 3.0 to 3.1
Bumping to 3.1, There are a bunch of tickets related to this which need proper test-cases so we can fix all of these sort of bugs together.
The resulting code was clearly mis-typed. It should have been:
`<div> <label for="select_element">This is a select box that is placed<br /> <select name="select_element"><option value="1">inline</option></select>
<p>inline with the label.</label> </div>`