[wp-trac] Re: [WordPress Trac] #3492: Visual Rich Editor wipes out table rows where a CSS class is specified

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 8 11:58:47 GMT 2007

#3492: Visual Rich Editor wipes out table rows where a CSS class is specified
 Reporter:  figcar     |        Owner:  anonymous
     Type:  defect     |       Status:  reopened 
 Priority:  normal     |    Milestone:           
Component:  TinyMCE    |      Version:           
 Severity:  normal     |   Resolution:           
 Keywords:  has-patch  |  
Changes (by framm):

  * keywords:  => has-patch
  * resolution:  invalid =>
  * status:  closed => reopened
  * component:  Administration => TinyMCE


 The response by "foolswisdom" does not make sense and must be due to a
 misunderstanding, maybe because the bug was not clearly marked as being a
 TinyMCE bug.

 The bug occurs when you work on a post with '''any attribute on a TR
 tag''' (not just class), and the bug occurs in '''any role''' (not just
 non-trusted roles).

 This bug persists in the current SVN version. It is due to the following
 line (249) in wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js:
 content = content.replace(new RegExp('</tr>.*?<(tr|/table)>', 'mg'),
 This tries to remove lint between a closing </tr> and the next opening
 <tr>, but does not allow for any attributes on the opening <tr>; if the
 opening <tr> carries a "class" or other attribute, then everything up to
 the next attribute-less <tr> or the closing </table> will be wiped.

 The solution is slightly changing the Regex; patch attached.

Ticket URL: <http://trac.wordpress.org/ticket/3492#comment:4>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list