Sanitising data in WordPress
Sanitization is the process of cleaning or filtering your input data. Whether the data is from a user or an API or web service, you use sanitizing when you don’t know what to expect or you don’t want to be strict with data validation.
The easiest way to sanitize data is with built-in WordPress functions.
The
developer.wordpress.orgsanitize_*()
series of helper functions provide an effective way to ensure you’re ending up with safe data, and they require minimal effort on your part:
Visit: https://developer.wordpress.org/themes/theme-security/data-sanitization-escaping/
No comments
Add a comment