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:
+1
-2
@@ -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/>' .
|
||||
|
||||
Reference in New Issue
Block a user