sanitizeElementName() — astro Function Reference
Architecture documentation for the sanitizeElementName() function in component.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 6ea1c71a_443e_0e61_4bbb_058280eae6a2["sanitizeElementName()"] 8fc97f1b_c914_c155_013d_cbd729fb6b4f["component.ts"] 6ea1c71a_443e_0e61_4bbb_058280eae6a2 -->|defined in| 8fc97f1b_c914_c155_013d_cbd729fb6b4f d89f42fe_2e3e_d985_e361_b90a7e5694d4["renderFrameworkComponent()"] d89f42fe_2e3e_d985_e361_b90a7e5694d4 -->|calls| 6ea1c71a_443e_0e61_4bbb_058280eae6a2 style 6ea1c71a_443e_0e61_4bbb_058280eae6a2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/runtime/server/render/component.ts lines 401–405
function sanitizeElementName(tag: string) {
const unsafe = /[&<>'"\s]+/;
if (!unsafe.test(tag)) return tag;
return tag.trim().split(unsafe)[0].trim();
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does sanitizeElementName() do?
sanitizeElementName() is a function in the astro codebase, defined in packages/astro/src/runtime/server/render/component.ts.
Where is sanitizeElementName() defined?
sanitizeElementName() is defined in packages/astro/src/runtime/server/render/component.ts at line 401.
What calls sanitizeElementName()?
sanitizeElementName() is called by 1 function(s): renderFrameworkComponent.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free