HTML text escaper
Represent markup-sensitive characters as entity text instead of treating them as HTML tags.
Worked input and output
Input
<p class="note">A & B</p>
Output
<p class="note">A & B</p>
The less-than, greater-than, quote and ampersand characters become HTML entity text. Encoding a string is different from sanitizing an HTML document or making an arbitrary URL safe.