[wp-trac] [WordPress Trac] #20943: Paragraphs get removed in table cells when Visual editor is refreshed

WordPress Trac wp-trac at lists.automattic.com
Fri Jun 15 23:50:55 UTC 2012


#20943: Paragraphs get removed in table cells when Visual editor is refreshed
---------------------------+------------------------------
 Reporter:  JboyJW         |       Owner:
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  TinyMCE        |     Version:  3.3.2
 Severity:  normal         |  Resolution:
 Keywords:  needs-testing  |
---------------------------+------------------------------

Comment (by azaozz):

 Replying to [comment:1 Otto42]:
 > Confirmed, the issue is in TinyMCE somewhere.

 No, the issue is in wpautop (both JS and PHP versions). It doesn't handle
 well block elements that can contain other blocks (mostly <p>). To
 reproduce: save a draft with the above html code from the HTML editor and
 check the source when viewing the post. It is:

 {{{
 <table>
 <tbody>
 <tr>
 <td>
 Test one</p>
 <p>Test two</p>
 <p>Test three
 </td>
 </tr>
 </tbody>
 </table>
 }}}

 where only the first paragraph is broken as HTML 5 allows for no closing
 </p>.

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


More information about the wp-trac mailing list