From: Alexander Ebert Date: Thu, 5 Jan 2017 12:27:04 +0000 (+0100) Subject: Deny block elements inside lists X-Git-Tag: 3.0.0~47 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cd89e20b90adadae86ae8dd1742d491ff68cf3ee;p=GitHub%2FWoltLab%2FWCF.git Deny block elements inside lists --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabBlock.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabBlock.js index 3a240230bb..9a4e1feac4 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabBlock.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabBlock.js @@ -31,6 +31,12 @@ $.Redactor.prototype.WoltLabBlock = function() { var mpFormatCollapsed = this.block.formatCollapsed; this.block.formatCollapsed = (function(tag, attr, value, type) { + var block = this.selection.block(); + if (block && block.nodeName === 'LI') { + // lists cannot contain other block elements + return; + } + if (this.detect.isFirefox()) { var editor = this.core.editor()[0]; if (document.activeElement !== editor) {