From b503432d35b7382b268c1d6d21ce41ee004087bd Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 18 Dec 2017 11:53:40 +0100 Subject: [PATCH] Added missing check for an empty editor on edit --- .../install/files/js/WoltLabSuite/Core/Ui/Comment/Edit.js | 7 +++++++ 1 file changed, 7 insertions(+) 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, -- 2.20.1