campfire.js
    Preparing search index...

    Function escape

    • a simple HTML sanitizer. Escapes &, <, >, ', and " by replacing them with their corresponding HTML escapes (&amp;,&gt;, &lt;, &#39;, and &quot).

      Parameters

      • str: string

        A string to escape.

      Returns string

      The escaped string. No characters other than the ones mentioned above are escaped. escape is only provided for basic protection against XSS and if you need more robust functionality consider using another HTML escaper (such as he or sanitize-html).