Hi,
I am trying to develop a component for a mobile website which allows users to click on a link and make a phone call on the mobile device.
I have tried to use the following code :
<a href="tel:<%=xssAPI.encodeForHTML(tel)%>" >Click and Call!</a> // where tel is for instance: 12345678
But CQ keeps displaying:
localhost:4502/content/mysite/_tel_12345678
I need the link to display as tel:123456789
I've also tried using href="http://tel:<%=xssAPI.encodeForHTML(tel)%>" which displays 'tel:12345678' when mouse hovering over on a computer. However, as soon as I deploy the code on a mobile device and press on the link, it redirects to 'http://tel.12345678' which results in an error page.
Has anyone had any experience in bypassing CQ's URL prefixing and force the href to be what the user input is?
Many thanks.