Skip to content

Commit

Permalink
fix(section): escape questions to duplciate
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Mar 5, 2019
1 parent fb30d55 commit 9786afa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions inc/section.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9786afa

Please sign in to comment.