Function unescape

  • The inverse of escapethis method converts the HTML entities &, <, >, " and ' in string to their corresponding characters.

    Note: No other HTML entities are unescaped. To unescape additional HTML entities use a third-party library like he.

    Parameters

    • string: string

      The string to unescape.

    Returns string

    string Returns the unescaped string.

    5.12.0

    [[escape]], [[escapeRegExp]]

    unescape('fred, barney, & pebbles')
    // => 'fred, barney, & pebbles'