diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 054d932a1f1..4ded311f7ed 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -681,7 +681,7 @@ function checkVal($out = '', $check = 'alphanohtml', $filter = null, $options = // '"' is dangerous because param in url can close the href= or src= and add javascript functions. // '../' is dangerous because it allows dir transversals $out = str_replace(array('"', '"'), "''", trim($out)); - $out = str_replace(array('../'), '', trim($out)); + $out = str_replace(array('../'), '', $out); // keep lines feed $out = dol_string_nohtmltag($out, 0); }