Merge pull request #15289 from frederic34/patch-16
can't input two lines address
This commit is contained in:
commit
9e509a805a
@ -659,11 +659,11 @@ function checkVal($out = '', $check = 'alphanohtml', $filter = null, $options =
|
||||
break;
|
||||
case 'alpha': // No html and no " and no ../
|
||||
case 'alphanohtml': // Recommended for most scalar parameters and search parameters
|
||||
if (!is_array($out))
|
||||
{
|
||||
if (!is_array($out)) {
|
||||
// '"' 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));
|
||||
// keep lines feed
|
||||
$out = dol_string_nohtmltag($out, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1288,7 +1288,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
print '</td>';
|
||||
print '<td colspan="3">';
|
||||
print '<textarea name="address" id="address" class="quatrevingtpercent" rows="'.ROWS_2.'" wrap="soft">';
|
||||
print dol_escape_htmltag($object->address);
|
||||
print dol_escape_htmltag($object->address, 0, 1);
|
||||
print '</textarea>';
|
||||
print $form->widgetForTranslation("address", $object, $permissiontoadd, 'textarea', 'alphanohtml', 'quatrevingtpercent');
|
||||
print '</td></tr>';
|
||||
@ -1889,7 +1889,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
// Address
|
||||
print '<tr><td class="tdtop">'.$form->editfieldkey('Address', 'address', '', $object, 0).'</td>';
|
||||
print '<td colspan="3"><textarea name="address" id="address" class="quatrevingtpercent" rows="3" wrap="soft">';
|
||||
print dol_escape_htmltag($object->address);
|
||||
print dol_escape_htmltag($object->address, 0, 1);
|
||||
print '</textarea>';
|
||||
print $form->widgetForTranslation("address", $object, $permissiontoadd, 'textarea', 'alphanohtml', 'quatrevingtpercent');
|
||||
print '</td></tr>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user