From cd84bccdbf41dcd150a9dcc46b7d62ecbba1d4fb Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 19 Sep 2014 17:31:17 +0200 Subject: [PATCH] Fixed pasting --- wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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, ''); -- 2.20.1