element-hq / element-hq/element-web
HTML <br /> injected as readable text
- Dominant language
- TypeScript
- Stars
- 13.5k
- Forks
- 2.8k
- PR merge metrics
- PR metrics pending
Description
Element does not convert `\n` characters to `
` (#25891), so to reliably send messages that'd properly render on all clients, markdown newline syntax has to be used explicitly. Recently, however, that started to result in **readable** `
` being injected instead.
### Only messages with `\` character are affected, since that forces them into html mode. (#25891)
Example message:
```
line \* 1
line 2
```
(note the two spaces a the end of the first line, which is Markdown syntax for a newline)
The message above used to result in formatted_body that looked like
### `line * 1
\nline 2`
and rendered as
```
line * 1
line 2
```
on all clients.
Now, however, attempting do that injects `
` as **readable** text.
That is, formatted_body looks like
### `line * 1<br />\nline 2`
and the message renders as
```
line * 1
line 2
```
on all clients, including Element.
Essentially, it is now **entirely impossible** to send multi-line messages in markdown mode, as they're either not portable across all clients, or they're mangled.
### Operating system
All Of Them
### Browser information
All Of Them
### URL for webapp
app.element.io
### Application version
1.11.86
### Homeserver
matrix.org
### Will you send logs?
No
Contributor guide
Assessment
This issue has not been assessed yet.