WORKED CASE · SYNTHETIC TEST DATA

Display a markup sample as text

Documentation often needs to show a tag rather than render it. Escaping preserves the literal angle brackets and ampersand.

Input and settings

<p>A&B</p>

Run and interpret

Keep Encode selected. Compare the escaped opening and closing tags. Switch to Decode with the result to recover the original string.

Expected output

&lt;p&gt;A&amp;B&lt;&#x2F;p&gt;

Scope and possible misuse

HTML text escaping is not a sanitizer for arbitrary HTML, JavaScript, CSS or URL contexts. A decoded value is still untrusted; render it as text unless a separate sanitizer allows it.

Unexpected result? Report a minimal example