Skip to content

Commit

Permalink
fix(question): updating a question returns sanitized label
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Jan 25, 2023
1 parent a3c6972 commit 936ccd4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ajax/question_update.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
* ---------------------------------------------------------------------
*/

use Glpi\Toolbox\Sanitizer;

include ('../../../inc/includes.php');
Session::checkRight('entity', UPDATE);

Expand Down Expand Up @@ -57,4 +59,4 @@
http_response_code(500);
exit();
}
echo json_encode(['name' => $question->fields['name']], JSON_UNESCAPED_UNICODE);
echo json_encode(['name' => Sanitizer::unsanitize($question->fields['name'])], JSON_UNESCAPED_UNICODE);

0 comments on commit 936ccd4

Please sign in to comment.