GeoLeaf Core API - v3.0.0
    Preparing search index...

    Function sanitizeHTML

    • Sanitize HTML content and inject into a DOM element safely.

      Parameters

      • element: Element

        The target DOM element to inject content into.

      • html: string | null | undefined

        The HTML string to sanitize and inject. Null or undefined clears the element.

      • options: SanitizeHtmlOptions = {}

        Optional: { stripAll: true } to strip all tags; { allowedTags: [...] } to customize.

      Returns Element | null

      The element for chaining, or null if invalid.

      Sanitizes untrusted HTML via parseHtmlSafely before DOM injection; primary entry point.