Web Security · Junior · Question 25 of 75
What is output encoding (escaping) in the context of XSS?
- ✓Correct answer: Converting special characters like
<and"into safe forms for the exact place where data is inserted - 2Compressing output with gzip before sending it
- 3Encrypting the response body with the user's password
Explanation
HTML body, attribute, URL and JavaScript contexts each need different encoding. Templating engines and frameworks do this automatically when used the normal way.