MDL-71093 backup: fix backup when activity names use HTML tags
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user