Characters rendered as html tags in 1.4.26
See original GitHub issueSteps to reproduce
Happens markdown enabled and disabled both
- Reply to a message having a word with quotation marks or find a message with the characters below.
- See that it’s mangled.
Quotation marks:
Apostrophe and zero-width:
On web this looks like:
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>"test"",
"msgtype": "m.text"
},
"room_id": "!MJOXUSmcmyjOXEjsbp:...",
"type": "m.room.message"
}
{
"content": {
"body": " ♫ We're on easy street ♫",
"format": "org.matrix.custom.html",
"formatted_body": "​ ♫ We'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:
- Created a year ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top 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 A A Capital A
a a a a Lowercase A
À À À À Capital A‑grave...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can also download the signed apks: https://github.com/vector-im/element-android/releases/tag/v1.4.28
Correct, this is a regression from 6537. I figured out how to fix it, expect a PR.