Escape converts special characters to HTML entities (&, <, >, ", ') so text can be safely embedded in HTML. Unescape decodes entities back to plain text, including named entities like and numeric ones like '.
Unescaping uses the browser's own HTML parser, so every entity the browser knows is supported. Everything runs locally.