← All nodes
Unstructured Text

HTML Encoder

Convert characters that have a special meaning in HTML into entities, so text displays exactly as written.

When to use it

Typical uses: Displaying HTML or XML code examples in blog posts; Preparing text for HTML attributes; Escaping content for email templates.

In a pipeline

Settings

SettingTypeRequiredDefault or hint
Text columnselect—Text
Also encode non-ASCII characters (é → é)checkbox—false
Generate New Columncheckbox—false
New Column Nametext—Default: <column> Result
Insert Afterselect—After the column
When a value cannot be convertedselect—stop

Example

HTML Encoder: an example

    Text arriving
    Text
    <a href="/menu">Café & Bar</a>
    The text after this node
    Text
    &lt;a href=&quot;/menu&quot;&gt;Café &amp; Bar&lt;/a&gt;

    Worth knowing

    • Which characters are encoded? Ampersand, less-than, greater-than, double quote and single quote. With the option ticked, all non-ASCII characters are encoded too.
    • How do I reverse it? Use the HTML Decoder.
    • Is this enough to prevent XSS? Escaping is one important layer, but the right escaping depends on where the text is used. Use your framework’s templating and a content security policy in production.
    • Works on any text column, not only Text Input's: pick it under Text column. Tick Generate New Column to keep the original next to the result.

    Others in Unstructured Text