- π©πͺGermany marc.bau
I see you added
['tel:+1 (555) 666-7777']
what is nice as I'm wondering if spaces and brackets should be url encoded in TelephoneLinkFormatter.RFC https://datatracker.ietf.org/doc/html/rfc3966#section-5.1 shows an example where
<a href="tel:+1-201-555-0111">(201) 555-0111</a>
spaces are removed and brakets become hyphens. This seems not addressed here. But maybe this is a follow up issue for TelephoneLinkFormatter? - π¦πΊAustralia nigelcunningham Geelong
When implementing this, please don't forget use cases outside of the USA. In Australia, we have some shorter six digit numbers (132 500, for example) and there are also the emergency service numbers (not necessarily 911 - alternatives I know include 000, 111 and 112.
- π¦πΊAustralia darvanen Sydney, Australia
#64: The documentation β as such indicates that tel: should be supported and #11 is correct that PHP's native parse_url is not fit for purpose here. I think we need to either revive the custom approach or do another scan to see if there's a library out there now which supports this requirement.
- π¦πΊAustralia dpi Perth, Australia
There shouldnt be any validation of anything after `tel:` to be honest. Theres simply to many localized variants, take a look a look a https://github.com/giggsey/libphonenumber-for-php which is implements the PHP version of the unofficially standard phone number validation and formatting library libphonenumber.
I think, non-empty-string is the only thing we should be validating against.
Re this issue as a whole, things would be a hell of a lot easier if we don't consider tel:
- πΊπΈUnited States bradjones1 Digital Nomad Life
Related/potential duplicate that addresses this more broadly: π Not all URIs are URLs, but UriWidget won't accept non-URL URIs Needs work
- π¦πΊAustralia nigelcunningham Geelong
I started work on updating the patch in earlier commits for merging, per SMustgrave's comment in #64, but have been asked to move on to other things, so I'm pushing what I've gotten done so far in the hope that maybe it won't go to waste.