Start with <p title="Tom & Jerry">© 2026 — café</p>. Minimal named mode changes syntax characters only; non-ASCII mode also converts ©, — and é.

Expected minimal named result

The exact result is &amp;lt;p title=&amp;quot;Tom &amp;amp; Jerry&amp;quot;&amp;gt;© 2026 — café&amp;lt;/p&amp;gt;. Literal Unicode text remains visible because minimal scope targets only the five reserved characters.

Verify the exact destination

Character-reference encoding changes text representation, not the trust level of the data. Keep the output as text until the receiving system applies the correct context-specific escaping or sanitization. Compare the complete result after pasting it into that system. For a repeatable check, keep one literal fixture beside its expected encoded form, run the same selected profile twice, and compare every ampersand, semicolon, code point, space, and line break. Then test the receiving text binding with harmless representative characters. If the destination rewrites, normalizes, repeatedly decodes, or renders the value, document that later behavior separately because it is outside EntityCodec.