PHP·98 questions

How to protect against XSS?

Answer
htmlspecialchars($data, ENT_QUOTES, 'UTF-8').
When outputting user data.
Content-Security-Policy header.
HTTPOnly cookies.
Use templating engines with auto-escaping.
Was this answer helpful?

More questions in this topic

Related questions from other topics