1
0
mirror of https://github.com/moodle/moodle.git synced 2025-04-24 09:55:33 +02:00

MDL-61876 mod_data: call format_text on template before replacement

Otherwise when $CFG->forceclean is enabled all search input fields are stripped out
This commit is contained in:
Marina Glancy 2018-05-07 11:18:09 +08:00
parent 23fbd252db
commit b03c67e978

@ -1918,13 +1918,12 @@ function data_print_preference_form($data, $perpage, $search, $sort='', $order='
}
// actual replacement of the tags
$newtext = preg_replace($patterns, $replacement, $data->asearchtemplate);
$options = new stdClass();
$options->para=false;
$options->noclean=true;
echo '<tr><td>';
echo format_text($newtext, FORMAT_HTML, $options);
echo preg_replace($patterns, $replacement, format_text($data->asearchtemplate, FORMAT_HTML, $options));
echo '</td></tr>';
echo '<tr><td colspan="4"><br/>' .