Svelte · Junior · Question 25 of 76
What is the risk of {@html content}?
- ✓Correct answer: It inserts raw HTML without escaping, so untrusted content can cause XSS
- 2It doesn't work with SSR
- 3It makes the content unreactive
Explanation
Only use it with trusted or sanitized HTML. Scoped styles also don't apply to markup inserted this way.