MDL-46073 badges: Make sure html tags are not used in badge description

Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
This commit is contained in:
Yuliya Bozhko 2014-07-08 09:37:27 +12:00
parent 92e7886965
commit dcf8e1f5d8

View file

@ -54,7 +54,7 @@ class edit_details_form extends moodleform {
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client'); $mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
$mform->addElement('textarea', 'description', get_string('description', 'badges'), 'wrap="virtual" rows="8" cols="70"'); $mform->addElement('textarea', 'description', get_string('description', 'badges'), 'wrap="virtual" rows="8" cols="70"');
$mform->setType('description', PARAM_CLEANHTML); $mform->setType('description', PARAM_NOTAGS);
$mform->addRule('description', null, 'required'); $mform->addRule('description', null, 'required');
$str = $action == 'new' ? get_string('badgeimage', 'badges') : get_string('newimage', 'badges'); $str = $action == 'new' ? get_string('badgeimage', 'badges') : get_string('newimage', 'badges');