Skip to content
Sharp

OWASP Vulnerabilities · interview question

How would you explain a key strategy Java web applications use to protect against Stored XSS attacks in an interview?

Multiple choiceEasychapter-17-curatedpremiumowasp-vulnerabilitiescross-site-scripting-xss
Choose one answer
Answer and explanation

Correct answer

D. HTML Entity Encoding of user inputs before rendering

Why

HTML Entity Encoding converts characters that could be interpreted as HTML tags into safe strings. This prevents malicious scripts from being executed in the browser.

Test yourself on OWASP Vulnerabilities

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

Start free test
All OWASP Vulnerabilities questions →