When editing website CMS settings, is there a way to tell the CMS to not sanitize the input? The website in question contains a call-to-action (CTA) on the front page with an input. See picture:
See that I added the <br />
tag to ad a line break between the email and phone number. This is because the result as is is a long CTA, I’d like to split it into two lines. But the output ignores the tag:
<div class="front-call-to-action">
<a class="front-button" href="mailto:myname@example.com" >
Tel: 123.456.7891 myname@example.com </a>
</div>
I’m aware that I could use editor to hard edit the output but wondered if there was a special character of some sort that I can use to tell the CMS to output the tag, rather than ignore it?
Note that this is distinct from the standard CMS back end where an admin would enter text and could edit using “raw html” input in the text input. This concerns the website set up input.
My answer then is going to be – don’t do it that way at all.
Have two input fields, one for telephone number and one for email address. Here’s how I normally do it below, in this case I’ve used option tree for the options, but pulling the data out of the option isn’t the issue, it’s what you do after;
So the fact that it’s split means I can form a link with the telephone number that will work on smartphones, the number can be clicked on to call it. You can style them both differently and appropriately and the email address rather than just getting output to screen for all and sundry to scrape at least gets obfuscated a little bit using this function in functions.php