Skip to content

Commit fc082a6

Browse files
authored
Merge pull request #576 from wirecard/TPWDCEE-4382
2 parents 2ca6662 + bb4d608 commit fc082a6

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.7.2
1+
3.7.3

src/Transaction/Risk.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,8 @@ public function mappedProperties()
265265
*/
266266
private function sanitizeDescriptor($descriptor, $length, $regex)
267267
{
268-
return mb_strimwidth(preg_replace($regex, '', $descriptor), 0, $length);
268+
$sanitizedDescriptor = preg_replace($regex, '', $descriptor);
269+
//Remove double spaces and cut to width
270+
return mb_strimwidth(preg_replace('/\s+/', ' ', $sanitizedDescriptor), 0, $length);
269271
}
270272
}

src/Transaction/SofortTransaction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class SofortTransaction extends Transaction
2121
* Allowed characters:
2222
* umlaut, '0-9' 'a-z' 'A-Z' ' ' '+' ',' '-' '.'
2323
*/
24-
const DESCRIPTOR_ALLOWED_CHAR_REGEX = "/[^a-zA-Z0-9\s\'\+\,\-\.\Ä\Ö\Ü\ä\ö\ü]/u";
24+
const DESCRIPTOR_ALLOWED_CHAR_REGEX = "/[^a-zA-Z0-9\s\+\,\-\.\Ä\Ö\Ü\ä\ö\ü]/u";
2525

2626
/**
2727
* @var bool

0 commit comments

Comments
 (0)