Skip to content
Sharp

Authentication · interview question

How does HTML encoding help prevent stored XSS attacks?

Multiple choiceMediumchapter-17-curatedpremiumauthenticationsalting-and-bcrypt
Choose one answer
Answer and explanation

Correct answer

D. By converting special characters into safe HTML entities.

Why

HTML encoding converts special characters, such as < and >, into safe HTML entities, thus preventing malicious scripts from being executed in the browser. This is crucial for mitigating stored XSS attacks.

Test yourself on Authentication

A free test with instant, explained results. No account needed.

Start free test
All Authentication questions →