Ticket #2992: 2992.diff

File 2992.diff, 993 bytes (added by Nazgul, 6 years ago)
Line 
1Index: wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js
2===================================================================
3--- wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js   (revision 5966)
4+++ wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js   (working copy)
5@@ -246,7 +246,7 @@
6                                content = content.replace(new RegExp('<(table( [^>]*)?)>.*?<((tr|thead)( [^>]*)?)>', 'mg'), '<$1><$3>');
7                                content = content.replace(new RegExp('<(tr|thead|tfoot)>.*?<((td|th)( [^>]*)?)>', 'mg'), '<$1><$2>');
8                                content = content.replace(new RegExp('</(td|th)>.*?<(td( [^>]*)?|th( [^>]*)?|/tr|/thead|/tfoot)>', 'mg'), '</$1><$2>');
9-                               content = content.replace(new RegExp('</tr>.*?<(tr|/table)>', 'mg'), '</tr><$1>');
10+                               content = content.replace(new RegExp('</tr>.*?<(tr.*?|/table)>', 'mg'), '</tr><$1>');
11                                content = content.replace(new RegExp('<(/?(table|tbody|tr|th|td)[^>]*)>(\\s*|(<br ?/?>)*)*', 'g'), '<$1>');
12 
13                                // Pretty it up for the source editor.