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

WordPress Trac wp-trac at lists.automattic.com
Sat Jun 16 18:30:24 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
Component:  Formatting                           |  Review
 Severity:  normal                               |     Version:  3.3.2
 Keywords:  needs-testing has-patch needs-unit-  |  Resolution:
  tests                                          |
-------------------------------------------------+-------------------------
Changes (by azaozz):

 * keywords:  needs-testing has-patch => needs-testing has-patch needs-unit-
     tests


Comment:

 Unfortunately it's not that easy :)

 The patch works for the above example html code but fails for:

 {{{
 <td>Test one

 Test two

 Test three</td>
 }}}

 The problem with <p> in block tags that can contain other blocks is that
 it's optional, i.e. it can be `<td>some text</td>` or `<td><p>some
 text</p></td>` or even `<td>some text<p>some more text</p></td>`.

 We will need separate rules for these cases. The alternative is to
 standardize on always having the <p> in there, but that's undesirable.

 Also, this would need good/extensive unit tests if we are to get it right.

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


More information about the wp-trac mailing list