I'm using the REST API v2 from Wordpress, and the response is including <p>
tags along with HTML codes (e.g.: –
) in the content and title fields. I'd like to utilize PHP's sanitize function to get rid of the HTML. I think the file I need to touch is /wp-includes/rest-api.php
but I'm not sure where or which function to add. Maybe sanitize_text_field
?
Asked
Active
Viewed 552 times
1

Server Side
- 21
- 2
-
Possible duplicate of [Sanitizing HTML input](https://stackoverflow.com/questions/5512712/sanitizing-html-input) – Aedvald Tseh Jun 20 '18 at 13:18