I am working on a project that is crawling data on a website. I am making a request to a URL and then running some scripts on the response (HTML). I would like to store the HTML response in the database.
I am looking for input on the proper way to sanitize HTML before storing it in the WordPress database. I know there are some built in functions with WordPress, but I need to sanitize and escape this HTML code without stripping anything out of it.
Thanks for the input!