Any way to allow href=tel: telephone anchor links in posts?


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.

Thanks in advance.

@neil added support for custom URI href protocols so it should work if enabled in your site settings under allowed href schemes.

<a href="tel:1-562-867-5309">1-562-867-5309</a>

I’m not 100% sure this one will work since it doesn’t follow the uri:// scheme though.

There are a lot of these:


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.

Great stuff.


Thank you for this :blush:

Glad to be of help! Good luck :slight_smile: