EU Parliament Monitor — API Documentation - v0.9.0
    Preparing search index...

    Module Generators/Shared/HtmlEscape

    Centralized HTML/XML escaping utilities for the generation layer. Wraps the existing escapeHTML from utils/file-utils.ts and escapeXML from sitemap/xml-utils.ts with branded-type producers so downstream code can prove at compile-time that a string has been sanitized before interpolation.

    This module is the single gateway for creating branded SafeHtmlString and SafeXmlString values. Template code should accept only these types — never raw string — to prevent XSS.

    Functions

    toSafeHtml
    toSafeXml
    toAbsoluteUrl
    toRelativeFilePath