Your question is XSS Protection Approach. Take a moment with it on the right.
Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).
How do you protect against XSS?
Explain how you would prevent stored, reflected, and DOM-based cross-site scripting. Cover the controls you would apply in application code and browsers, how you would handle rich text, how you would test the defenses, and how you would detect and respond to an attempted bypass.