[wp-trac] [WordPress Trac] #22230: WP adds <br /> before <select even where there is no line break in source code
WordPress Trac
noreply at wordpress.org
Fri Oct 19 21:49:26 UTC 2012
#22230: WP adds <br /> before <select even where there is no line break in source
code
-----------------------------+--------------------------
Reporter: chirael | Type: defect (bug)
Status: new | Priority: normal
Milestone: Awaiting Review | Component: General
Version: 3.4.2 | Severity: normal
Keywords: |
-----------------------------+--------------------------
My source code in the WP HTML editor:
{{{
<label for="sellby">How soon do you need to sell?</label><select
id="sellby" name="sellby" required="1">
}}}
Note how there is *no line break* between </label> and <select
HTML generated by WP, however:
{{{
<label for="sellby">How soon do you need to sell?</label><br />
<select id="sellby" name="sellby" required="1">
}}}
Um, how (and why?) did that extra <br /> get in there?
This also happened when I was using the Visual editor; switched to the
HTML editor to see if it was an error on my part but nope - there is no
line break whatsoever in my HTML source code, so I have no idea why WP
insists on adding one.
It's particularly vexing because I would like my text label to be next to
(on the same line as) my select boxes, but WP is forcing it to be on the
next line, which is making my form look awful.
AFAIK it's only happening with select boxes, but it's pretty consistent
for me.
Since it's happening with the HTML editor as well as the Visual editor I
left the Component as General so better minds than mine can categorize it
appropriately.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22230>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list