Riksdagsmonitor Intelligence Platform โ€” API Documentation - v1.0.30
    Preparing search index...
    • Escape a value for use inside a single GitHub-flavoured Markdown table cell.

      MCP error/notes text and serialised queries can include |, raw newlines, and backticks โ€” all of which corrupt the table layout. We collapse whitespace and escape pipes so each diagnostic row remains a single, parseable row.

      Escape ordering matters: backslashes are doubled first so that any subsequent \| insertion remains an unambiguous escaped pipe (an input like foo\ followed by |bar must not be misread as a literal pipe preceded by an escaped backslash). This is the canonical fix flagged by CodeQL js/incomplete-sanitization.

      Parameters

      • value: unknown

      Returns string