MDL-71093 backup: fix backup when activity names use HTML tags

This commit is contained in:
Julien Boulen
2021-08-19 11:09:27 +02:00
parent 036800d99d
commit 196cb4e1f0
2 changed files with 75 additions and 3 deletions
+5 -3
View File
@@ -146,11 +146,13 @@ class base_setting_ui {
* @throws base_setting_ui_exception when the label is not valid.
* @param string $label
*/
public function set_label($label) {
$label = (string)$label;
if ($label === '' || $label !== clean_param($label, PARAM_TEXT)) {
public function set_label(string $label) :void {
$label = clean_param($label, PARAM_CLEANHTML);
if ($label === '') {
throw new base_setting_ui_exception('setting_invalid_ui_label');
}
$this->label = $label;
}