How this tool computes its result
Maintains two hardcoded replacement maps: escape converts & → &, < → <, > → >, " → ", ' → ' (in that order to avoid double-escaping the ampersand), and unescape reverses the process in reverse order (' → ', " → ", > → >, < → <, & → &). The tool applies these replacements via string.replace() with a regex pattern containing all entities in one pass, avoiding the "escape the escaper" problem by processing ampersand last in the unescape direction.
