Riksdagsmonitor Intelligence Platform - v0.7.19
    Preparing search index...

    Function escapeHtml

    • Escape HTML special characters for safe inclusion in HTML/JSON-LD. Prevents XSS by converting &, <, >, ", ' to their HTML entity equivalents.

      Parameters

      • text: string | number

        Raw text to escape

      Returns string

      Escaped text safe for HTML insertion; empty string for falsy input