Skip to content

Commit da9d8dc

Browse files
authored
fix(textfield): remove invalid '\r\n' tokens (#3065)
1 parent 69088c0 commit da9d8dc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

inc/field/textfield.class.php

+4
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,10 @@ public function parseAnswerValues($input, $nonDestructive = false): bool {
226226
return false;
227227
}
228228

229+
if (version_compare(GLPI_VERSION, '9.5.10', '>=')) {
230+
$input[$key] = str_replace('\r\n', "\r\n", $input[$key]);
231+
}
232+
229233
$this->value = Toolbox::stripslashes_deep($input[$key]);
230234
return true;
231235
}

0 commit comments

Comments
 (0)