Support

Account

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);