Inputsanitizationmiddleware

InputSanitizationMiddleware cleans the global GET and POST arrays. It recursively applies htmlspecialchars so user supplied HTML is neutralised. The sanitized data is stored in the request as 'get' and 'post' so the rest of your code can work with safe values.