Fixed table sanitizing not applied to all tables
authorAlexander Ebert <ebert@woltlab.com>
Sun, 22 Feb 2015 11:08:07 +0000 (12:08 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 22 Feb 2015 11:08:07 +0000 (12:08 +0100)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js

index b4d18c8ca96206184516bdd90614c9f59088dbe4..144ecb840a37ce2004ef881c443cb09f398f3fb3 100644 (file)
@@ -315,8 +315,8 @@ RedactorPlugins.wbbcode = function() {
                        html = html.replace(/<a[^>]*?><\/a>/g, '');
                        
                        // unwrap <p></p><table></table><p></p>
-                       html = html.replace(/<p><\/p><table/, '<table');
-                       html = html.replace(/<\/table><p><\/p>/, '</table>');
+                       html = html.replace(/<p><\/p><table/g, '<table');
+                       html = html.replace(/<\/table><p><\/p>/g, '</table>');
                        
                        // handle empty paragraphs not followed by an empty one
                        html = html.replace(/<p><\/p><p>(?!<br>)/g, '<p>@@@wcf_empty_line@@@</p><p>');