WordPress.org

Make WordPress Core

Ticket #2992: 2992.diff

File 2992.diff, 993 bytes (added by Nazgul, 11 years ago)
  • wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js

     
    246246                                content = content.replace(new RegExp('<(table( [^>]*)?)>.*?<((tr|thead)( [^>]*)?)>', 'mg'), '<$1><$3>');
    247247                                content = content.replace(new RegExp('<(tr|thead|tfoot)>.*?<((td|th)( [^>]*)?)>', 'mg'), '<$1><$2>');
    248248                                content = content.replace(new RegExp('</(td|th)>.*?<(td( [^>]*)?|th( [^>]*)?|/tr|/thead|/tfoot)>', 'mg'), '</$1><$2>');
    249                                 content = content.replace(new RegExp('</tr>.*?<(tr|/table)>', 'mg'), '</tr><$1>');
     249                                content = content.replace(new RegExp('</tr>.*?<(tr.*?|/table)>', 'mg'), '</tr><$1>');
    250250                                content = content.replace(new RegExp('<(/?(table|tbody|tr|th|td)[^>]*)>(\\s*|(<br ?/?>)*)*', 'g'), '<$1>');
    251251
    252252                                // Pretty it up for the source editor.