Skip to content
Sharp

Spring Security · interview question

Why is HTML encoding important in preventing Stored XSS attacks?

Multiple choiceMediumchapter-17-curatedpremiumspring-securityspring-security-filter-chain
Choose one answer
Answer and explanation

Correct answer

C. It converts special characters to a safe format.

Why

HTML encoding is crucial for preventing Stored XSS attacks as it converts special characters into their HTML entity equivalents, rendering scripts as inert content rather than executable code.

Test yourself on Spring Security

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

Start free test
All Spring Security questions →