Skip to content

Commit 8d837f3

Browse files
committed
fix(section,question): workaround GLPI bug
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 <[email protected]>
1 parent 08f07cf commit 8d837f3

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

ajax/question_add.php

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
http_response_code(400);
4545
exit;
4646
}
47+
$question->getFromDB($question->getID()); // To remove if GLPI #9210 merged
4748
$json = [
4849
'y' => $question->fields['row'],
4950
'x' => $question->fields['col'],

ajax/section_add.php

+1
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,5 @@
4444
echo __('Could not add the section', 'formcreator');
4545
exit;
4646
}
47+
$section->getFromDB($section->getID()); // To remove if GLPI #9210 merged
4748
echo $section->getDesignHtml();

0 commit comments

Comments
 (0)