diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 90fc879bd17..1f38719dbb1 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -2098,6 +2098,10 @@ class ExtraFields { $value_key = GETPOST("options_".$key, 'alpha'); } + elseif (in_array($key_type, array('text'))) + { + $value_key = GETPOST("options_".$key, 'alphanohtml'); + } else { $value_key = GETPOST("options_".$key); diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 967849d775a..91a3061dd41 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -601,7 +601,7 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null // '"' 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 = dol_string_nohtmltag($out, 1); + $out = dol_string_nohtmltag($out, 0); } break; case 'restricthtml': // Recommended for most html textarea