Skip to content

Commit

Permalink
fix(textfield): remove invalid '\r\n' tokens (#3065)
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric-anne authored Nov 7, 2022
1 parent 69088c0 commit da9d8dc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions inc/field/textfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ public function parseAnswerValues($input, $nonDestructive = false): bool {
return false;
}

if (version_compare(GLPI_VERSION, '9.5.10', '>=')) {
$input[$key] = str_replace('\r\n', "\r\n", $input[$key]);
}

$this->value = Toolbox::stripslashes_deep($input[$key]);
return true;
}
Expand Down

0 comments on commit da9d8dc

Please sign in to comment.