From: Alexander Ebert Date: Mon, 6 Apr 2015 00:00:41 +0000 (+0200) Subject: Fixed potential infinite loop X-Git-Tag: 2.1.3~35 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d7b1244d452f7051af991ceff45ef0e7c006e037;p=GitHub%2FWoltLab%2FWCF.git Fixed potential infinite loop --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wutil.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wutil.js index 302b302d19..10e76ca683 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wutil.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wutil.js @@ -837,13 +837,12 @@ RedactorPlugins.wutil = function() { * @return boolean */ isNodeWithin: function(node, element) { - var $node = $(node); - while ($node[0] !== this.$editor[0]) { - if ($node[0] === element) { + while (node && node !== this.$editor[0]) { + if (node === element) { return true; } - $node = $node.parent(); + node = node.parentNode; } return false;