Web Security · Junior · Question 27 of 75

Which approach to blocking XSS is the most reliable?

Explanation

Blocklists are easy to bypass: <img onerror>, <svg onload> and encoding tricks don't contain <script>. Contextual encoding works no matter what the input is.

Further reading

Problem with a question

Web Security · Junior · question 27

Test yourself

Take the Web Security · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz