Skip to content

Commit

Permalink
fix(textfield,textareafield): escaping problem when editing question
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
MLOcc authored and btry committed Oct 5, 2020
1 parent 55accb8 commit 231e9e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion inc/fields/textareafield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public function isValid() {
}

public function prepareQuestionInputForSave($input) {
$this->value = str_replace('\r\n', "\r\n", $input['default_values']);
$this->value = Toolbox::stripslashes_deep(str_replace('\r\n', "\r\n", $input['default_values']));
return $input;
}

Expand Down
2 changes: 1 addition & 1 deletion inc/fields/textfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public function prepareQuestionInputForSave($input) {
if (!$success) {
return [];
}
$this->value = str_replace('\r\n', "\r\n", $input['default_values']);
$this->value = Toolbox::stripslashes_deep(str_replace('\r\n', "\r\n", $input['default_values']));

return $input;
}
Expand Down

0 comments on commit 231e9e4

Please sign in to comment.