Skip to content

quotes are escaped in field [name] of [glpi_plugin_formcreator_formanswers] #3271

@MLOcc

Description

@MLOcc

Hi,
The name of the form having quotes is stored with backslashes in field 'name' of 'glpi_plugin_formcreator_formanswers'

image
image

To Reproduce

  1. Set a form with quote in his name
  2. Answer the form
  3. Look entry created in 'glpi_plugin_formcreator_formanswers'
  • GLPI version 10.0.6
  • FormCreataor 2..13.5

I solve the problem by replacing
$input['name'] = $DB->escape($this->parseTags($form->fields['formanswer_name']));
by
$input['name'] = $this->parseTags($form->fields['formanswer_name']);
on line 831 of /inc/formanswer.class.php (prepareInputForAdd function)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions