SchildiChat / SchildiChat-android

Matrix client / Element Android fork
https://schildi.chat/android/
Apache License 2.0
386 stars 49 forks source link

Pills with underscore are shown three times #156

Closed bbhtt closed 1 year ago

bbhtt commented 1 year ago

Describe the bug

Send a pill with an underscore infront for example #_oftc_#iwd:matrix.org, see that it is shown thrice in the UI:

To Reproduce

  1. Send a pill with an underscore infront

Expected behavior

It should be displayed only once

Screenshots

image

Smartphone (please complete the following information):

Additional context

Upstream relevance

This doesn't seem to happen with Element 1.5.2

Add any other context about the problem here.

Message content:

{
  "content": {
    "body": "#_oftc_#iwd:matrix.org ",
    "format": "org.matrix.custom.html",
    "formatted_body": "<a href=\"https://matrix.to/#/#_oftc_#iwd:matrix.org\">#<em>oftc</em>#iwd:matrix.org</a>",
    "msgtype": "m.text"
  }
}
SpiritCroc commented 1 year ago

Ouch. Thanks for reporting. From my initial tests, a single underscore is not a problem, but having two of them is. Likely again another markdown library issue, comparable to https://github.com/SchildiChat/SchildiChat-android/issues/148