Redundant styles: Purge the inner style rather than the outer one
authorAlexander Ebert <ebert@woltlab.com>
Thu, 15 Aug 2019 09:58:15 +0000 (11:58 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 15 Aug 2019 09:58:15 +0000 (11:58 +0200)
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabClean.js

index 6991a7a80626d7528365b7b7ba4acd0d433605b8..062f165b2b19571e48a05ba5ca3861566959180c 100644 (file)
@@ -639,9 +639,9 @@ $.Redactor.prototype.WoltLabClean = function() {
                                'u'
                        ];
                        elBySelAll(plainTags.join(','), this.$editor[0], function(element) {
-                               if (elBySel(element.nodeName, element) !== null) {
-                                       removeElements.push(element);
-                               }
+                               elBySelAll(element.nodeName, element, function(child) {
+                                       removeElements.push(child);
+                               });
                        });
                        
                        // Search for span[style] that contain styles that actually do nothing, because their set style