Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-30805 Require HTML content for the HTML block configuration

  • Loading branch information...
commit c50d05671b9f7cecf97327d07a2550c9c332ed6b 1 parent 7f7d9ce
@andrewnicols andrewnicols authored samhemelryk committed
Showing with 1 addition and 0 deletions.
  1. +1 −0  blocks/html/edit_form.php
View
1  blocks/html/edit_form.php
@@ -39,6 +39,7 @@ protected function specific_definition($mform) {
$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
}
Please sign in to comment.
Something went wrong with that request. Please try again.