# Message content

The `content` of every message and note is [Markdown](https://commonmark.org/help/), whether it came from the Messenger, email, the dashboard, an assistant, or the API. Content you send is rendered as Markdown in the Messenger and the dashboard, and content you read should be treated as Markdown.

## Text typed by users

Users write plain text in the Messenger and in email replies, so Optlo escapes any character that would otherwise be read as formatting. A visitor who types `*urgent*` is stored as `\*urgent\*`, and it displays as typed.

Only characters that would change the rendering are escaped, so most text, including email addresses, hyphens, and parentheses, is stored unchanged. Messages created before this behavior may escape more characters, such as `first\-last@example.com`.

## Getting plain text

To display content as plain text, render it with a Markdown library and take the text, or remove the escapes: drop a backslash that comes before an ASCII punctuation character.

```js
let plain = message.content.replace(/\\([!-/:-@[-`{-~])/g, "$1");
```

This keeps any other Markdown, such as links and emphasis written by operators or assistants, as raw syntax.

## Sending content

When you create a message or note:

- Content is trimmed and must be between 1 and 1,100 characters.
- Raw HTML is not rendered and appears as text.
- Bare URLs are not turned into links. Write links as `[text](https://example.com)`.
- Links must use `https`, `http`, `mailto`, `sms`, or `tel`.
- Images must be files uploaded to Optlo.

Content that breaks these rules is rejected with a `422` [error response](/docs/api-reference/errors/). To send text that should appear exactly as written, escape Markdown characters with a backslash, such as `\*`.
