From 2ee40a70189ed6320a88c1358efddce1e479b754 Mon Sep 17 00:00:00 2001 From: Andrew Robert Nicols Date: Mon, 19 Dec 2011 12:00:54 +0000 Subject: [PATCH] MDL-30805 Require HTML content for the HTML block configuration --- blocks/html/edit_form.php | 1 + 1 file changed, 1 insertion(+) diff --git a/blocks/html/edit_form.php b/blocks/html/edit_form.php index 35d6e9425cd..30c005dcaec 100644 --- a/blocks/html/edit_form.php +++ b/blocks/html/edit_form.php @@ -39,6 +39,7 @@ class block_html_edit_form extends block_edit_form { $editoroptions = array('maxfiles' => EDITOR_UNLIMITED_FILES, 'noclean'=>true, 'context'=>$this->block->context); $mform->addElement('editor', 'config_text', get_string('configcontent', 'block_html'), null, $editoroptions); + $mform->addRule('config_text', null, 'required', null, 'client'); $mform->setType('config_text', PARAM_RAW); // XSS is prevented when printing the block contents and serving files }