Skip to main content
InterviewHubPRO
Section Overview
Q32

Question 32 of 50

Part 3: Advanced Internals, Scale & Production Architecture (Senior / Lead)

64%
Astro Islands & SSR (50 Qs)•Part 3: Advanced Internals, Scale & Production Architecture (Senior / Lead)

Security Best Practices in Astro: Preventing Content Injection.

senior LevelSecurity & AuthSystem DesignAstro

In Simple Words:

  • In Astro templates, all expressions {untrustedString} are automatically HTML-escaped.
  • If rendering raw HTML with set:html, always sanitize using DOMPurify or sanitize-html to prevent XSS.