[wp-trac] [WordPress Trac] #32548: Unecessary White Space Above Table

WordPress Trac noreply at wordpress.org
Sun Feb 5 22:45:55 UTC 2017


#32548: Unecessary White Space Above Table
--------------------------+------------------------------
 Reporter:  ChuckC3       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Formatting    |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+------------------------------
Changes (by swissspidy):

 * keywords:  reporter-feedback => needs-patch
 * component:  Editor => Formatting


Comment:

 {{{
 <TABLE>
 <TR>
 <TD>xx</TD><TD>yy</TD></TR>
 <TR><TD>11</TD><TD>22</TD></TR>
 <TABLE>
 }}}

 Is not valid HTML, but it will end up like this in the DOM:

 {{{
 <table>
   <tbody>
     <tr>
       <td>xx</td><td>yy</td>
     </tr>
     <tr>
       <td>11</td><td>22</td>
     </tr>
   </tbody>
 </table>
 }}}

 However, WordPress adds the following before that:

 {{{
 <p></p><br><br><br><br>
 …
 }}}

 If you enter the valid table from the DOM in the editor and save the post,
 not `<br>`'s are being printed anymore.

 Sounds like a `wpautop()` to me.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32548#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list