MDL-75788 testing: Handle new lines in menu profile field generator

This commit is contained in:
Dani Palou
2022-12-02 14:58:38 +08:00
committed by Simey Lameze
parent bdba78514f
commit e2d166e526
3 changed files with 36 additions and 0 deletions
+5
View File
@@ -1320,6 +1320,11 @@ EOD;
[$data['categoryid']]) + 1;
}
if ($data['datatype'] === 'menu' && isset($data['param1'])) {
// Convert new lines to the proper character.
$data['param1'] = str_replace('\n', "\n", $data['param1']);
}
// Defaults for other values.
$defaults = [
'description' => '',