Skip to content

Commit 936ccd4

Browse files
committed
fix(question): updating a question returns sanitized label
1 parent a3c6972 commit 936ccd4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ajax/question_update.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
* ---------------------------------------------------------------------
3030
*/
3131

32+
use Glpi\Toolbox\Sanitizer;
33+
3234
include ('../../../inc/includes.php');
3335
Session::checkRight('entity', UPDATE);
3436

@@ -57,4 +59,4 @@
5759
http_response_code(500);
5860
exit();
5961
}
60-
echo json_encode(['name' => $question->fields['name']], JSON_UNESCAPED_UNICODE);
62+
echo json_encode(['name' => Sanitizer::unsanitize($question->fields['name'])], JSON_UNESCAPED_UNICODE);

0 commit comments

Comments
 (0)