diff --git a/inc/section.class.php b/inc/section.class.php index bc502a172..8ed8a94ff 100644 --- a/inc/section.class.php +++ b/inc/section.class.php @@ -193,6 +193,12 @@ public function duplicate() { $row['uuid']); $row['plugin_formcreator_sections_id'] = $newSection_id; $row['_skip_checks'] = true; + + // escape text fields + foreach (['name', 'description'] as $key) { + $row[$key] = $DB->escape($row[$key]); + } + if (!$new_questions_id = $section_question->add($row)) { return false; }