question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Characters rendered as html tags in 1.4.26

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
proletarius101commented, Jul 15, 2022

When is that release expected?

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

1reaction
cloudrac3rcommented, Jul 3, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Convert special characters to HTML in JavaScript
This generic function encodes every nonalphabetic character to its HTML code (numeric character reference (NCR)):
Read more >
HTML URL Encoding Reference - W3Schools
Character From Windows‑1252 From UTF‑8 space %20 %20 ! %21 %21 " %22 %22
Read more >
HTML Standard
1 Introduction; 2 Common infrastructure; 3 Semantics, structure, and APIs of HTML documents; 4 The elements of HTML; 5 Microdata; 6 User interaction ......
Read more >
Some HTML tags not being rendered in the iOS app
Recently there were some other bug reports related to the replacing of special characters on notifications and others, so probably it is ...
Read more >
HTML codes and HTML special characters: The complete list
Character Entity name Entity number Hex Code Description A A &#65 &#x41 Capital A a a &#97 &#x61 Lowercase A À &Agrave &#192 &#xC0 Capital A‑grave...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found