• Converts the characters “&”, “<”, “>”, ‘"’, and “’” in string to their corresponding HTML entities.

    Parameters

    • str: string

      The string to escape.

    Returns string

    Returns the escaped string.