Permalink
Browse files

MDL-30805 Require HTML content for the HTML block configuration

  • Loading branch information...
1 parent 39f8f2e commit f59aa125e2fae2d98f2e61edb59f0c391df04546 @andrewnicols andrewnicols committed with Sam Hemelryk Dec 19, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 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
}

0 comments on commit f59aa12

Please sign in to comment.