Infinite loop when reading the adjacent text content
authorAlexander Ebert <ebert@woltlab.com>
Tue, 13 Feb 2018 19:06:01 +0000 (20:06 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 13 Feb 2018 19:06:01 +0000 (20:06 +0100)
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabIndent.js

index 42cecfa5c33a334cfc2ff2a5bba5a1e0cf5e01cd..d96337696fcf1f055a8d5ddd59471cf8aa22e089 100644 (file)
@@ -77,7 +77,7 @@ $.Redactor.prototype.WoltLabIndent = function() {
                                                        // verify that there is no text after the br
                                                        var text = '';
                                                        var sibling = lastElement;
-                                                       while (sibling.nextSibling) {
+                                                       while (sibling = sibling.nextSibling) {
                                                                text += sibling.textContent;
                                                        }