• Unescapes a HTML removing traces of offending characters that could be wrongfully interpreted as markup. The following characters are reserved in HTML and must be replaced with their corresponding HTML entities:

    • " is replaced with "
    • & is replaced with &
    • < is replaced with &lt;
    • > is replaced with &gt;

    Parameters

    • text: string
    • decodeNbsp: boolean = false

      Shall &nbsp; be replaced with space ( ).

    Returns string

    Example

    ix.util.htmlDecode("&lt;a href=&quot;https://foobar?rq_foo=bar&amp;rq_bar=foo&quot;&gt;encode me &lt;/a&gt;");
    // returns: "<a href="https://foobar?rq_foo=bar&rq_bar=foo">encode me </a>"

    Example

    ix.util.htmlDecode("&lt;h1&gt;example&lt;/h1&gt;&lt;br&gt;&lt;p&gt;my&nbsp;cool&nbsp;paragraph&lt;/p&gt;", true);
    // returns: "<h1>example</h1><br><p>my cool paragraph</p>"