diff --git a/ajax/question_update.php b/ajax/question_update.php index 36597d2e7..c99ff5190 100644 --- a/ajax/question_update.php +++ b/ajax/question_update.php @@ -29,6 +29,8 @@ * --------------------------------------------------------------------- */ +use Glpi\Toolbox\Sanitizer; + include ('../../../inc/includes.php'); Session::checkRight('entity', UPDATE); @@ -57,4 +59,4 @@ http_response_code(500); exit(); } -echo json_encode(['name' => $question->fields['name']], JSON_UNESCAPED_UNICODE); \ No newline at end of file +echo json_encode(['name' => Sanitizer::unsanitize($question->fields['name'])], JSON_UNESCAPED_UNICODE); \ No newline at end of file