Promptles
Security

Input Sanitization

beginner

Definition

Carefully cleaning anything a visitor types into a website before doing anything with it: stripping out tricks, rejecting weird formats, and making sure the data is what you expected. It's the front-line defense against attackers who try to slip dangerous instructions into ordinary-looking form fields.

In the wild

A blog comment box accepts what looks like a normal message but secretly contains hidden instructions designed to break the website. Sanitization spots that hidden mischief and quietly removes it, leaving only the harmless text the visitor actually wrote.

More from Security