Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion content/en/monitors/notify/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,20 @@ For instance, assume your composite monitor has a sub-monitor `a`, which is a Lo

### Character escape

Variable content is escaped by default. To prevent content such as JSON or code from being escaped, use triple braces instead of double braces, for example: `{{{event.text}}}`.
Variable content is HTML-encoded by default. For example, special characters like `&` and `'` are converted to `&` and `'` in the rendered output. To output raw, unencoded content, use triple curly braces instead of double curly braces:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean if you put this in the notification message template:

This & that

In the actual notification received, you'd see:

This & that

If so, maybe this could make it clearer:

Suggested change
Variable content is HTML-encoded by default. For example, special characters like `&` and `'` are converted to `&` and `'` in the rendered output. To output raw, unencoded content, use triple curly braces instead of double curly braces:
Variable content is HTML-encoded by default. For example, if a notification message contains special characters like `&` and `'`, the characters are converted to `&` and `'` in the rendered output. To output raw, unencoded content, use triple curly braces instead of double curly braces:


| Syntax | Output |
|--------|--------|
| `{{variable}}` | HTML-encoded (default) |
| `{{{variable}}}` | Raw, unencoded |

For example, to render the check message without HTML encoding:

```text
{{{check_message}}}
```

This is particularly relevant when `{{check_message}}` contains auto-generated URLs with query parameters (for example, on HTTP Check monitors). The `&` characters in those URLs are HTML-encoded by default, which can break clickable links in notifications. Use `{{{check_message}}}` to preserve the URLs as-is.

## Template variables

Expand Down
Loading