EU Parliament Monitor — API Documentation - v1.0.11
    Preparing search index...

    Function stripScriptBlocks

    • Remove every <script>…</script> block (and their contents) from an HTML string using a case-insensitive linear scan. Defends against XSS payloads smuggled into AI-generated article fragments before the markdown is rendered into the final article HTML.

      Parameters

      • html: string

        Raw HTML possibly containing <script> blocks.

      Returns string

      HTML with every <script>…</script> block removed.