From: Alexander Ebert Date: Mon, 18 Dec 2017 10:53:40 +0000 (+0100) Subject: Added missing check for an empty editor on edit X-Git-Tag: 3.1.0_Beta_5~31 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b503432d35b7382b268c1d6d21ce41ee004087bd;p=GitHub%2FWoltLab%2FWCF.git Added missing check for an empty editor on edit --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Comment/Edit.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Comment/Edit.js index 64e18ab485..a01b0671f9 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Comment/Edit.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Comment/Edit.js @@ -230,6 +230,13 @@ define( // remove all existing error elements elBySelAll('.innerError', this._activeElement, elRemove); + // check if editor contains actual content + var editorElement = elById(this._getEditorId()); + if (window.jQuery(editorElement).data('redactor').utils.isEmpty()) { + this.throwError(editorElement, Language.get('wcf.global.form.error.empty')); + return false; + } + var data = { api: this, parameters: parameters,