• Returns the escaped html string of the given text

    Parameters

    • Optionaltext: null | string

      the source string to inspect

    Returns string | undefined | null

    the escaped html string of the given text

    escapeHtml('<div>foobar<div>');    // '&lt;div&gt;foobar&lt;div&gt;'