element-hq / element-android

A Matrix collaboration client for Android.
https://element.io/
GNU Affero General Public License v3.0
3.38k stars 726 forks source link

Characters rendered as html tags in 1.4.26 #6445

Closed bbhtt closed 2 years ago

bbhtt commented 2 years ago

Steps to reproduce

Happens markdown enabled and disabled both

  1. Reply to a message having a word with quotation marks or find a message with the characters below.
  2. See that it's mangled.

Quotation marks:

image

Apostrophe and zero-width:

image

On web this looks like:

image

The event source for example:

{
  "content": {
    "body": "> <@...> test\n\n\"test\"",
    "format": "org.matrix.custom.html",
    "formatted_body": "<mx-reply><blockquote><a href=\"https://matrix.to/#/!MJOXUSmcmyjOXEjsbp:.../$0VkvhRhLoDGyfXa86lX704YSw2DaOOSYA0jdUq7SdQo?via=...\">In reply to</a> <a href=\"https://matrix.to/#/@...\">@...</a><br />test</blockquote></mx-reply>&quot;test&quot;",
    "msgtype": "m.text"
  },
  "room_id": "!MJOXUSmcmyjOXEjsbp:...",
  "type": "m.room.message"
}
{
  "content": {
    "body": "​ ♫ We're on easy street ♫",
    "format": "org.matrix.custom.html",
    "formatted_body": "&ZeroWidthSpace; ♫ We&apos;re on easy street ♫",
    "msgtype": "m.text"
  },
  "event_id": "$165681828423000brNSu:matrix.org",
  "origin_server_ts": 1656818284642,
  "sender": "@_snoonet_gonzobot:matrix.org",
  "type": "m.room.message",
  "unsigned": {},
  "room_id": "!czDHgTFPrQVLaaYqbk:matrix.org"
}

Outcome

What did you expect?

Rendered properly.

What happened instead?

Rendered as html tags

Your phone model

No response

Operating system version

Andorid 10

Application version and app store

1.4.26 Google Play

Homeserver

No response

Will you send logs?

No

Are you willing to provide a PR?

No

bbhtt commented 2 years ago

Probably a regression from https://github.com/vector-im/element-android/pull/6357

cloudrac3r commented 2 years ago

Correct, this is a regression from 6537. I figured out how to fix it, expect a PR.

ouchadam commented 2 years ago

Fixed in v1.4.28

dreaddr commented 2 years ago

When is that release expected?

proletarius101 commented 2 years ago

When is that release expected?

You can also download the signed apks: https://github.com/vector-im/element-android/releases/tag/v1.4.28