From d7b1244d452f7051af991ceff45ef0e7c006e037 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 6 Apr 2015 02:00:41 +0200 Subject: [PATCH] Fixed potential infinite loop --- .../install/files/js/3rdParty/redactor/plugins/wutil.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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; -- 2.20.1