Home › Forums › Front-end Issues › Is sanitization required for front end form? › Reply To: Is sanitization required for front end form?
Hi @wootimes, this function is most appropriate for what you need to do 🙂
It covers all fields without having to specify one by one.
function my_kses_post( $value ) {
// is array
if( is_array($value) ) {
return array_map('my_kses_post', $value);
}
// return
return wp_kses_post( $value );
}
add_filter('acf/update_value', 'my_kses_post', 10, 1);
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.