A bug has been reported where HTML code is displayed in replies to messages that start with a mention. simon_tomes initially reported the issue, providing an example of how the HTML code <a class="mention" href="/u/simon_tomes">@simon_tomes</a> is displayed instead of just @simon_tomes. Firepup650 further explained that this issue occurs when there’s at least one message in between the mention and the reply. The bug also affects group mentions and mentions that aren’t at the beginning of the message. simon_tomes noted that the issue seemed to have regressed. However, martin announced that the issue will be fixed with a commit in the GitHub pull request https://github.com/discourse/discourse/pull/22559.
In the chat, if you mention someone, have at least one message in between, and then have someone (or yourself) reply to the message with the mention, the reply will show something like <a class="mention" href="/u/firepup650">@Firepup650</a> instead of the mention. Including < and/or > in your message will become < and >. This seems to be a recent change, and seems a bit unintentional, because if your message is just a mention, it works fine, but any other text in the message will cause it to become HTML in replies.