Users are discussing the ability to use href="tel:xxxx-xxxx-xxx" links in Discourse posts to dial phone numbers. ewanyork initially reported that these links were being removed by Discourse. However, codinghorror pointed out that enabling custom URI href protocols in site settings under allowed href schemes should resolve this issue. After updating Discourse, ewanyork confirmed that this solution works, but only with the prefix tel:// instead of tel:. Although Markdown does not support this feature, inserting the full HTML link allows for functional and dialable phone number links.
We’d like to put links to telephone numbers in Discourse posts, using the href=“tel:xxxx-xxxx-xxx” protocol. I’ve tried doing so using raw HTML anchor links and with Markdown, but Discourse always removes the href attribute totally and leaves us just with a plain anchor link without a target.
Is there any way I can achieve this? I can’t find a setting to change, so am wondering if it’s possible to escape the string in some way to prevent Discourse parsing and removing this? Since Discourse works so nicely on mobile, it seems a shame to completely prohibit tel: links.
Quick update for anyone else who’s interested: we now have the latest Discourse update and can confirm this is working, but only if the phone number is prefixed with tel:// (rather than just tel: which is the standard). I can confirm the links still work and are diallable!
Can’t be done with Markdown but works fine if the full HTML link is inserted.