[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
Sat Oct 20 09:47:24 UTC 2012


#22230: WP adds <br /> before <select even where there is no line break in source
code
--------------------------+------------------------------
 Reporter:  chirael       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Formatting    |     Version:  3.4.2
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------
Changes (by toscho):

 * cc: info@… (added)
 * component:  General => Formatting


Comment:

 This happens because `wpautop()` treats `select` as a block element.

 {{{

 // Space things out a little
 $allblocks =
 '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|option|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)';
 }}}

 Hm, `option` too. No idea why.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22230#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list