diff --git a/typo3/sysext/core/Classes/LinkHandling/TelephoneLinkHandler.php b/typo3/sysext/core/Classes/LinkHandling/TelephoneLinkHandler.php index 6f062ee18781fabca962f55e484dcad346f9a6ce..1fe0fc426f1cff8ba5f16cf917e93ac7f664501b 100644 --- a/typo3/sysext/core/Classes/LinkHandling/TelephoneLinkHandler.php +++ b/typo3/sysext/core/Classes/LinkHandling/TelephoneLinkHandler.php @@ -30,7 +30,7 @@ class TelephoneLinkHandler implements LinkHandlingInterface */ public function asString(array $parameters): string { - $telephoneNumber = preg_replace('/(?:[^\d\+]+)/', '', $parameters['telephone']); + $telephoneNumber = preg_replace('/(?:[^\d\+,;]+)/', '', $parameters['telephone']); return 'tel:' . $telephoneNumber; } diff --git a/typo3/sysext/core/Tests/Unit/LinkHandling/TelephoneLinkHandlerTest.php b/typo3/sysext/core/Tests/Unit/LinkHandling/TelephoneLinkHandlerTest.php index 1b36ba5f932cb3972b90ce6f0bd4de07ae6e8dc6..0b9c1c1989a70fdfbb90aaf55b4d37a7bf8e713a 100644 --- a/typo3/sysext/core/Tests/Unit/LinkHandling/TelephoneLinkHandlerTest.php +++ b/typo3/sysext/core/Tests/Unit/LinkHandling/TelephoneLinkHandlerTest.php @@ -69,6 +69,15 @@ class TelephoneLinkHandlerTest extends UnitTestCase ], 'tel:+43123455678', ], + 'telephone number with comma and semicolon' => [ + [ + 'telephone' => 'tel:+43 123 45 56 78,; 1234', + ], + [ + 'telephone' => '+43 123 45 56 78,; 1234', + ], + 'tel:+43123455678,;1234', + ], ]; }