From 7263f9805e10a664778c1868de0df58b8d749ffc Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 21 Jan 2015 01:23:54 +0100 Subject: [PATCH] Unified behavior for newline after [/quote] tag --- .../install/files/js/3rdParty/redactor/plugins/wutil.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wutil.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wutil.js index 1aa841b9ac..a4cee4264a 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wutil.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wutil.js @@ -256,7 +256,13 @@ RedactorPlugins.wutil = function() { submit: function() { if (this.wutil.inWysiwygMode()) { this.code.startSync(); - this.$textarea.val($.trim(this.wbbcode.convertFromHtml(this.$textarea.val()))); + + var $text = $.trim(this.wbbcode.convertFromHtml(this.$textarea.val())); + + // remove linebreak after [/quote] + $text = $text.replace(/\[\/quote\]\n/g, '[/quote]'); + + this.$textarea.val($text); } this.wutil.autosavePurge(); -- 2.20.1