Skip to content

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 sanitize_*() 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:

developer.wordpress.org

Visit: https://developer.wordpress.org/themes/theme-security/data-sanitization-escaping/

No comments

Add a comment

Start the conversation.
Be the first to comment.

Popular topics

On development

On best practice

On content strategy