From 0db90b31f63eb10087a59158c028739f86755aaa Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 3 Nov 2017 14:48:11 +0100 Subject: [PATCH] Improved detection of pasted HTML --- .../install/files/js/3rdParty/redactor2/plugins/WoltLabPaste.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabPaste.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabPaste.js index 0d86aebdda..caa90421c2 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabPaste.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabPaste.js @@ -98,7 +98,7 @@ $.Redactor.prototype.WoltLabPaste = function() { pastedHtml = e.originalEvent.clipboardData.getData('text/html'); // remove document fragments - if (pastedHtml.match(/^[\s\S]*?([\s\S]+)<\/body>\s*<\/html>$/)) { + if (pastedHtml.trim().match(/^]*>[\s\S]*?]*>([\s\S]+)<\/body>[\s\S]*?<\/html>$/)) { pastedHtml = RegExp.$1.replace(/^\s*(?:)(.+)(?:)?\s*$/, '$1'); } } -- 2.20.1