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
Text InputHTML EncoderText Output
Settings
| Setting | Type | Required | Default or hint |
|---|---|---|---|
| Text column | select | — | Text |
| Also encode non-ASCII characters (é → é) | checkbox | — | false |
| Generate New Column | checkbox | — | false |
| New Column Name | text | — | Default: <column> Result |
| Insert After | select | — | After the column |
| When a value cannot be converted | select | — | stop |
Example
HTML Encoder: an example
| Text |
|---|
| <a href="/menu">Café & Bar</a> |
| Text |
|---|
| <a href="/menu">Café & Bar</a> |
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.