Hi,
I know ACF came out with wp_kses on forms a while back, but I also know it doesn’t apply to get_field. How do I combine wp_kses with get_field correctly so that script tags etc. get stripped?
Thanks so much.
To alter the formatted content that ACF returns you would us an acf/format_value filter for that field.
wp_kses_post() will allow all tags that are allowed in post content. If you want to remove html tags then you would use wp_strip_all_tags() instead.
Hi @hube2, thanks so much for replying to my post. It looks like that’s exactly what I need. I will get cracking on this and let you know how I go.