Hello, I am starting on a new site with ACF Pro and wondering where the option to allow HTML or disallow HTML has been moved on text fields?
Text Fields
I do not see the drop down to allow HTML
Text Areas
The drop down I see for New Lines does not mention HTML. Does this mean HTML is enabled by default?
Hi @stormlux
Yes, this setting has been removed, and HTML will render as default.
If you wish to prevent HTML from being rendered, you can use a function like so:
$value = get_field('field_name');
$value = htmlspecialchars($value, ENT_QUOTES);
Hi,
I’m trying to use the ‘Text Area’ field to inject various scripts.
Each time I save the wp page hosting the field, the html markup including <script> tags gets removed from the field in the backend wp page.
Is there a way to resolve this? Or a diferent field that I sohould be using?
Thanks in advance!