element-hq / element-hq/element-android

URL's enclosed within code blocks still surface as embeds

Open
#4,835 0 comments 0 reactions 0 assignees View on GitHub
A-Timeline O-Uncommon S-Minor T-Defect
Dominant language
Kotlin
Stars
3.7k
Forks
917
PR merge metrics
No merged PRs in 30d

Description

### Steps to reproduce

1. Enter a URL which displays an embed or a URL which maps directly to an image and enclose this within code blocks using the backtick notation (``) - e.g ``` `https://matrix.org` ```

Or reproduce using this event:
```
"content": {
"body": "https://zv.wtf/matrix.png",
"msgtype": "m.text",
"format": "org.matrix.custom.html",
"formatted_body": "https://zv.wtf/matrix.png"
}
```

### Outcome

#### What did you expect?
- On Element Android the URL should not embed as it's enclosed within codeblocks

#### What happened instead?
- The URL shows the embed as though the code blocks were absent
- The intended behaviour is demonstrated on Element Web and other alternative chat apps.

| Element Web | Element Android |
| ----------- | ----------- |
| image | ![image](https://user-images.githubusercontent.com/31471433/147897275-045e9d54-8a52-4da2-845e-bea7c0fcd27d.png) |

### Your phone model

Pixel 4a

### Operating system version

Android 12

### Application version and app store

From playstore - 1.3.2

### Homeserver

N/A

### Will you send logs?

No

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.