Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Blocks are horribly broken when in a reply #2247

Closed
ghost opened this issue Oct 12, 2020 · 3 comments
Closed

Code Blocks are horribly broken when in a reply #2247

ghost opened this issue Oct 12, 2020 · 3 comments

Comments

@ghost
Copy link

ghost commented Oct 12, 2020

Describe the bug
Code blocks <pre><code></code></pre> are horribly broken for android users. Instead of interpreting the html correctly, the client seems to try to parse the contents as partial markdown of sorts? This only seems to happen to RichEmbed replies, not normal posts.

To Reproduce

{
    "msgtype": "m.notice",
    "body": "This doesn't really matter for recreating the issue",
    "format": "org.matrix.custom.html",
    "formatted_body": "<mx-reply><blockquote><a href=\"https://matrix.to/#/!nowhere:example.com/$nowhere\">In reply to</a><a href=\"https://matrix.to/#/@noone:example.com\">@noone:example.com</a><br />Some text</blockquote></mx-reply><pre><code class=\"language-plain\">EXAMPLE(1)                     Element Android                         HELP(1)\n\n<b>NAME</b>\n       example - example page\n\n<b>DESCRIPTION</b>\n       <b>example</b> is a manual page to recreate failures in the Element Android message renderer.\n\n<b>EXAMPLE</b>\n       <b>example</b> list\n           Lorus Ipsum\n\n       <b>__example__</b> list\n           Lorus Ipsum\n\n       <b>[example](https://example.com)</b> list\n           Lorus Ipsum\n\n       <b>**example**</b> list\n           Lorus Ipsum\n\n1.0.0                             2020-10-11                        EXAMPLE(1)\n</code></pre>\n"
}

Expected behavior
Element should just render the html normally. Codeblocks in general are broken in Element Android (and Riot.im Android) but this breakage is exceptional.

Screenshots
element

Smartphone (please complete the following information):

  • Device: Samsung S8
  • OS: Android 9

Additional context

  • App version and store: 1.0.8 Play
@ghost
Copy link
Author

ghost commented Feb 25, 2021

This bug still exists as of 1.0.16

@HarHarLinks
Copy link
Contributor

Some related things appear to have been fixed, e.g. #3576
Is this still an issue?

@cloudrac3r
Copy link
Contributor

This is fixed by my #6357 which is in release 1.4.26. Try updating.

@bmarty bmarty closed this as completed Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants