HTML Entity Encoder and Decoder — illustrative example INPUT Encode the text A & B for an HTML text node. RESULT A & B REVIEW Encoding and decoding depend on the destination context. Escaping HTML text is different from building a safe URL or JavaScript string. This is a teaching example, not a live execution record.