From: Alexander Ebert Date: Fri, 19 Sep 2014 15:31:17 +0000 (+0200) Subject: Fixed pasting X-Git-Tag: 2.1.0_Alpha_1~311^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cd84bccdbf41dcd150a9dcc46b7d62ecbba1d4fb;p=GitHub%2FWoltLab%2FWCF.git Fixed pasting --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js index 96a9a142e7..5f737288b5 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js @@ -815,6 +815,7 @@ RedactorPlugins.wbbcode = { // replace nested elements e.g.

...

html = html.replace(/<(div|p)([^>]+)?><(div|p)([^>]+)?>/g, '

'); html = html.replace(/<\/(div|p)><\/(div|p)>/g, '

@@@wcf_break@@@'); + html = html.replace(/<(div|p)>
<\/(div|p)>/g, '@@@wcf_break@@@'); WCF.System.Event.fireEvent('com.woltlab.wcf.redactor', 'beforePaste', { html: html }); @@ -835,7 +836,7 @@ RedactorPlugins.wbbcode = { html = html.replace(/]*>/g, ''); html = html.replace(/<\/header>/g, ''); - html = html.replace(/
.*?<\/div>/g, '

$1

'); + html = html.replace(/
(.*?)<\/div>/g, '

$1

'); // drop lonely divs html = html.replace(/<\/?div>/g, '');