Skip to content
Snippets Groups Projects
Commit 8132c138 authored by aydreeihn's avatar aydreeihn
Browse files

Format the advanced search title so that it will not allow javascript

parent d2ef3b1f
Branches
Tags
No related merge requests found
......@@ -136,7 +136,7 @@ class SearchAjaxAPI extends AjaxController {
$search->config = JsonDataEncoder::encode($form->getState());
if (isset($_POST['name']))
$search->title = $_POST['name'];
$search->title = Format::htmlchars($_POST['name']);
elseif ($search->__new__)
Http::response(400, 'A name is required');
if (!$search->save()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment