We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d0eef6 commit c31134cCopy full SHA for c31134c
install/upgrade_to_2.13.7.php
@@ -62,7 +62,7 @@ public function fixEncodingInQuestions() {
62
63
$table = 'glpi_plugin_formcreator_questions';
64
$result = $DB->request([
65
- 'SELECT' => 'id',
+ 'SELECT' => ['id', 'values'],
66
'FROM' => $table,
67
'WHERE' => [
68
'fieldtype' => ['select', 'multiselect'],
@@ -78,7 +78,8 @@ public function fixEncodingInQuestions() {
78
foreach ($values as &$value) {
79
$value = Sanitizer::encodeHtmlSpecialChars($value);
80
}
81
- $values = json_encode($values);
+ $values = json_encode($values, JSON_UNESCAPED_UNICODE, JSON_UNESCAPED_SLASHES);
82
+ $values = $DB->escape($values);
83
$DB->update(
84
$table,
85
['values' => $values],
0 commit comments