Escape or unescape HTML entities in text.
So text containing characters like <, > and & displays literally instead of being interpreted as HTML markup — important when rendering user-submitted text safely on a web page.
The five predefined XML/HTML entities: &, <, >, " and ' become &, <, >, " and '.
Unescaping does — the browser’s built-in decoder resolves both named entities (&) and numeric references (&) to their character.
Always escape immediately before inserting untrusted text into HTML markup — that’s what prevents it from being interpreted as tags.