element-hq / element-hq/element-ios
cmark adds <!-- raw HTML omitted --> when encountering inline tags in markdown
- Dominant language
- Swift
- Stars
- 1.8k
- Forks
- 544
- PR merge metrics
- PR metrics pending
Description
**Describe the bug**
If you accidentally add an inline tag, that isn't an actual HTML tag inside a message, like ``, that gets stripped by cmark since version 0.29.0 and repaced with ``.
Example:
```json
"formatted_body": "What I wanna get at is that it’d take a “different” client for matrix before it’s realistically easy to discern what the common denominator is between element and "
```
This is probably surprising to users. I'd recommend to instead set the unsafe flag and escape all html not safelisted in the matrix spec, so that `` gets sent as `<client>` and it shows up as users expected. Alternatively the comment could at least be removed, but that is very confusing imo.
**To Reproduce**
Steps to reproduce the behavior:
1. Send a message with a word inside angle brackets, for example ``
2. Observe that `` is sent.
**Expected behavior**
`` is sent.
**Smartphone (please complete the following information):**
- Device: iPhone 6s
- OS: 14.4.2
- Browser [e.g. stock browser, safari]
- Version 1.2.7
**Additional context**
Ask @deepbluev7:neko.dev, if you have any further questions. I implemented the same stuff in Nheko and I am just assuming you are using cmark from the output. ;-)
Contributor guide
Assessment
This issue has not been assessed yet.