Whitespace in the middle of a tracking number will break the link when (#37501)
the user tries to follow the shipping, so we remove all whitespace.
This commit is contained in:
parent
bc29bc1a8a
commit
6f4c1ef972
2 changed files with 3 additions and 0 deletions
|
|
@ -769,6 +769,7 @@ if (empty($reshook)) {
|
|||
|
||||
if ($action == 'settracking_number') { // Test on permission not required
|
||||
$object->tracking_number = trim(GETPOST('tracking_number', 'alpha'));
|
||||
$object->tracking_number = preg_replace('/\s+/', '', $object->tracking_number);
|
||||
}
|
||||
if ($action == 'settracking_url') { // Test on permission not required
|
||||
$object->tracking_url = trim(GETPOST('tracking_url', 'restricthtml'));
|
||||
|
|
|
|||
|
|
@ -432,6 +432,8 @@ class Expedition extends CommonObject
|
|||
|
||||
// Clean parameters
|
||||
$this->tracking_number = dol_sanitizeFileName((string) $this->tracking_number);
|
||||
$this->tracking_number = preg_replace('/\s+/', '', $this->tracking_number);
|
||||
|
||||
if (empty($this->fk_project)) {
|
||||
$this->fk_project = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue