[wp-trac] [WordPress Trac] #4298: wpautop: Avoid wrapping <table> tags with a paragraph

WordPress Trac noreply at wordpress.org
Fri Feb 10 21:30:03 UTC 2023


#4298: wpautop: Avoid wrapping <table> tags with a paragraph
-------------------------------------------------+-------------------------
 Reporter:  Denis-de-Bernardy                    |       Owner:
                                                 |  markjaquith
     Type:  defect (bug)                         |      Status:  closed
 Priority:  low                                  |   Milestone:
Component:  Formatting                           |     Version:  2.7
 Severity:  minor                                |  Resolution:  wontfix
 Keywords:  needs-patch needs-unit-tests         |     Focuses:
  wpautop                                        |
-------------------------------------------------+-------------------------
Changes (by azaozz):

 * status:  reopened => closed
 * resolution:   => wontfix
 * milestone:  Future Release =>


Comment:

 Replying to [comment:39 audrasjb]:
 > it looks like there is still an issue: <p> element can't contain
 <table>...

 Yes, generally wpautop doesn't support tables. There is a workaround: no
 line breaks between any of the table tags (tr, td, etc.). Then the tables
 mostly work properly.

 This ticket hasn't been fixed for 19 years because similar changes to
 wpautop tend to introduce bugs and other/new edge cases. Another reason is
 that some of the incorrect behavior may be expected by other code and
 fixing it would break that code.

 Re-closing as "wontfix" seems the right thing to do here.

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


More information about the wp-trac mailing list