with this event, neochat shows the escape sequences in the code block instead of the characters that are supposed to be shown { "content": { "body": "> <@deepbluev7:neko.dev> !sh cat /dev/aliases\n\nExited with code 1 in 48.0 ms. **stderr:**\n\n```\n\ncat: can't open '/dev/aliases': No such file or directory\n\n```", "format": "org.matrix.custom.html", "formatted_body": "<mx-reply><blockquote><a href='https://matrix.to/#/!urandom, version 9️⃣:maunium.net/$IjtPTuHjTcHrnJf5IkIuQXn8m_lzzVQ7VLAcLVLbquY'>In reply to</a> <a href='https://matrix.to/#/@deepbluev7:neko.dev'>@deepbluev7:neko.dev</a><br/>!sh cat /dev/aliases</blockquote></mx-reply><p>Exited with code 1 in 48.0 ms. <strong>stderr:</strong></p>\n<pre><code>\ncat: can't open '/dev/aliases': No such file or directory\n</code></pre>\n", "m.relates_to": { "m.in_reply_to": { "event_id": "$IjtPTuHjTcHrnJf5IkIuQXn8m_lzzVQ7VLAcLVLbquY" } }, "msgtype": "m.notice" }, "event_id": "$Xox7yliP7yj8bTcpP3pAbMCdqfKsEEP6Mhzr8rA5b1k", "origin_server_ts": 1718049530356, "sender": "@urandom:maunium.net", "type": "m.room.message", "unsigned": { } }
Hmm, not sure on this one. We treat everything in a code block as plain text because it should be. So unless we did that it's a bug with the client that sent it. It would be impossible to consistently figure out when we should or shouldn't convert these someone for example may intentionally want to send the escape sequences to be viewed. Treating as plain text is the only sane way to work.
Actually thinking about it we should
A possibly relevant merge request was started @ https://invent.kde.org/network/neochat/-/merge_requests/1818
Git commit 11475259a180aec98022f905be59420870078c8f by James Graham. Committed on 23/07/2024 at 17:27. Pushed by nvrwhere into branch 'master'. Make sure that apostrophes are unescaped when visualising messages Title M +1 -0 autotests/texthandlertest.cpp M +1 -0 src/texthandler.cpp https://invent.kde.org/network/neochat/-/commit/11475259a180aec98022f905be59420870078c8f