Thanks to visit codestin.com
Credit goes to scripting.getdrafts.com

Drafts Script Reference
    Preparing search index...

    Class HTML

    Helper methods to escape and unescape HTML entities in a string.

    let s = "<One> & Two";
    let escaped = HTML.escape(s); // "&#x3C;One&#x3E &#x26; Two"
    let unescaped = HTML.unescape(encoded); // "<One> & Two"
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Escape HTML entities in a string to be HTML safe.

      Parameters

      • string: string

        the string to escape

      Returns string

    • Unescape HTML entities in a string.

      Parameters

      • string: string

        the string to unescape

      Returns string