Fixed empty <input> elements remaining after paste
authorAlexander Ebert <ebert@woltlab.com>
Sat, 20 Jun 2015 13:23:49 +0000 (15:23 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 20 Jun 2015 13:23:49 +0000 (15:23 +0200)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wutil.js

index 10e76ca683a739004c0f92cc7e6b1e2019125c04..d41694bb41a95be8f6a4b1f0b5030fc3a87ffcb3 100644 (file)
@@ -1041,6 +1041,12 @@ RedactorPlugins.wutil = function() {
                                        $child.appendChild($node);
                                }
                        }
+                       
+                       // remove input elements
+                       var inputElements = this.$editor[0].getElementsByTagName('INPUT');
+                       while (inputElements.length) {
+                               inputElements[0].parentNode.removeChild(inputElements[0]);
+                       }
                }
        };
 };