diff --git a/src/components/ItaliaTheme/View/Commons/ContactLink.jsx b/src/components/ItaliaTheme/View/Commons/ContactLink.jsx index 8a8ed7403..6b7544aab 100644 --- a/src/components/ItaliaTheme/View/Commons/ContactLink.jsx +++ b/src/components/ItaliaTheme/View/Commons/ContactLink.jsx @@ -33,23 +33,27 @@ const ContactLink = ({ tel, fax, email, label = true, strong = false }) => { const intl = useIntl(); const formatTel = (str, type) => - str.split(/\+?[0-9]( ?[0-9/-]+)+.?[0-9]*/gm).map((v, i) => - i % 2 === 0 ? ( - {` ${v} `} - ) : ( - - {v} - - ), - ); + str + .split( + /((?:\+?\d{1,3}[-.\s]?)?(?:\(?\d{3}\)?[-.\s]?)?\d{3}[-.\s]?\d{4})/gm, + ) + .map((v, i) => + i % 2 === 0 ? ( + {` ${v} `} + ) : ( + + {v} + + ), + ); const formatEmail = (str) => str