Support

Account

Home Forums Front-end Issues How to output URL as text safely?

Helping

How to output URL as text safely?

  • I have absolutely no idea what is HTML escaping, but your documentation advises using this escaping.
    We don’t recommend outputting any ACF value without any sort of protection or escaping.
    So, I want to output a simple URL custom field in a way that would display my custom text instead of URL. I.e. I want url to look this way: <a href="https://example.com">MY TEXT</a>.

    How can I edit this example code to save that escapiness and enter my custom text to the link?

  • Where are you finding this

    We don’t recommend outputting any ACF value without any sort of protection or escaping.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.