I am trying to update data programmatically and have some HTML fields. What is the best practice for formatting the HTML to save via the update_field function? With no conversion, it fails, using htmlspecialcharacter is encodes the HTML and doesn’t display properly.
Would also love to get an answer here.
Not sure what you are trying to save but it could have something to do with kses. You might need to allow the html tags/attributes you are trying to save, see this https://www.advancedcustomfields.com/resources/html-escaping/