/

/

HTML entity

HTML entity

HTML entity

An HTML entity is a short text code that begins with an ampersand and ends with a semicolon, which a browser or email client decodes into a single character when it renders HTML. Examples: ` ` becomes a [non-breaking space](https://asteroad.com/glossary/non-breaking-space), `&` becomes `&`, `€` becomes the euro sign. Entities exist for characters that are invisible, reserved by HTML, or hard to type.

Category

HTML, template rendering

Also known as

character entity; entity reference;  

An HTML entity is a short text code that begins with an ampersand and ends with a semicolon, which a browser or email client decodes into a single character when it renders HTML. Examples:   becomes a non-breaking space, & becomes &, € becomes the euro sign. Entities exist for characters that are invisible, reserved by HTML, or hard to type.

How Asteroad uses it

Bloomreach Engagement's Jinja output is not HTML-autoescaped by default, so an entity stored in a catalog field renders verbatim and the email client decodes it. Storing   is an easy, auditable way to control wrapping because you can read it in the catalog. The catch is that it only works in HTML contexts. In a true plain-text channel (SMS, the text/plain MIME part) nothing decodes the entity, and the recipient sees the literal string  . For anything that can reach plain text, store the real character instead of the entity.