FIX Edit extrafield of type long text loose carriage returns

This commit is contained in:
Laurent Destailleur 2020-07-30 14:47:51 +02:00
parent 8045cff888
commit 8b879ee23b
2 changed files with 5 additions and 1 deletions

View File

@ -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);

View File

@ -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