Web Security · Junior · Question 24 of 75

What does an HTML sanitizer such as DOMPurify do?

Explanation

When you really need user HTML (a rich-text editor, for example), a well-maintained sanitizer strips <script>, event handlers like onerror and dangerous URLs.

Further reading

Problem with a question

Web Security · Junior · question 24

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