DiscordSRV

DiscordSRV

86.8k Downloads

Backslashes at the end of messages break DiscordToMinecraftMessageReplyFormat when using MiniMessage hover text

entwastaken opened this issue ยท 2 comments

commented

Expected behavior

Backslashes at the end of messages should not be able to escape the end apostrophe in the <hover:show_text:'%message%'> MiniMessage formatting used in DiscordToMinecraftMessageReplyFormat, and the message should be displayed like a normal one, pictured below.

Actual behavior

A message ending with a backslash is able to escape the apostrophe after %message in the <hover:show_text:'%message%'> MiniMessage formatting used in DiscordToMinecraftMessageReplyFormat, thus displaying the entire unformatted string in chat, pictured below.

Steps to reproduce

  1. In messages.yml under DiscordToMinecraftMessageReplyFormat, enable MiniMessage formatting hover text using something akin to <hover:show_text:'%message%'>(replying to %name%)
  2. Send a message in chat, ending it with a backslash.
  3. From Discord, reply to the aforementioned message
  4. The backslash at the end of the message will escape the apostrophe after %message% and will display the entire unformatted string, including the <hover:...> tag.

Server software and version

purpur-1999 (MC: 1.20.1)

Checks

  • I am not using an outdated version of DiscordSRV.
  • I asked in DiscordSRV's Discord server to see whether this issue is in fact a bug that needs to be fixed.

Anything else

No response

commented

I was unable to reproduce this issue with the steps provided when using the latest DiscordSRV snapshot.
The message was displayed like normal and the backslash was shown at the end when hovering.

commented

This has been fixed for a few months, but it came after a long period of inactivity in the Discord ticket associated with it, and I suppose nobody else closed this issue here.