@maschinenlesbar.org/openka-cli
    Preparing search index...

    Function sanitizeServerText

    • Strip the characters a terminal would act on from server-supplied text before it reaches stderr. Upstream text (a Content-Type, an error body) is untrusted.

      The trim is this function's own: a server body arrives padded with the newlines that framed it, and an error message should not start with them.

      Parameters

      • text: string

      Returns string