Skip to Content
⚠️Active Development Notice: TimeTiles is under active development. Information may be placeholder content or not up-to-date.

web


web / lib/utils/css-sanitizer

lib/utils/css-sanitizer

Sanitizes user-provided CSS to prevent injection attacks.

Strips dangerous patterns while preserving legitimate CSS. Used for custom CSS injection in the Sites customCode feature.

Functions

sanitizeCSS()

sanitizeCSS(css): string

Sanitize user-provided CSS by removing dangerous patterns.

Parameters

css

string

Raw CSS string from the CMS

Returns

string

Sanitized CSS string safe for injection

Last updated on