matrix-appservice-discord
matrix-appservice-discord copied to clipboard
\n in formatted_body aren't ignored
Describe the bug
\n in in a matrix' formatted_body should always be ignored by clients (and the bridge), as it's not responsible for showing line breaks (<br/> is). However, the bridge currently does not ignore it, and when sending to discord replaces the \n with a newline, even though it shouldn't
To Reproduce Steps to reproduce the behavior:
- Send a Matrix message whose formatted_body contains multiple \n', like the following string:
message\n<br />\nnewline
Expected behavior
message
newline
should be the message sent to discord
Actual behavior
messsage
newline
is the message that's actually sent.
Additional context Originally discovered with the NeoChat client, as it currently does not strip \n's from formatted_body
Thanks for the report. Sounds like a simple parser bug to me that we should fix!