Skip to content

Commit

Permalink
fix(section,question): workaround GLPI bug
Browse files Browse the repository at this point in the history
when adding an object with a single quote in a string field, escaping occurs when populationf fields of object, but not in DB.
Reloading the object mostly happens hiding the bug, see GLPI #9210

Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Jun 25, 2021
1 parent 08f07cf commit 8d837f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions ajax/question_add.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
http_response_code(400);
exit;
}
$question->getFromDB($question->getID()); // To remove if GLPI #9210 merged
$json = [
'y' => $question->fields['row'],
'x' => $question->fields['col'],
Expand Down
1 change: 1 addition & 0 deletions ajax/section_add.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@
echo __('Could not add the section', 'formcreator');
exit;
}
$section->getFromDB($section->getID()); // To remove if GLPI #9210 merged
echo $section->getDesignHtml();

0 comments on commit 8d837f3

Please sign in to comment.