TASVideos / tasvideos

The code for the live TASVideos website
https://tasvideos.org/
GNU General Public License v3.0
62 stars 29 forks source link

Revert "escape formatting symbols for discord publisher" #1753

Closed Masterjun3 closed 6 months ago

Masterjun3 commented 6 months ago

This reverts commit df97a929affe1527755f95a1be73da9a8f7a87c3. The commit implemented a very simple way of escaping by simply putting a backslash in front of every character allowing custom formatting.

The reason for this revert is a bug in Discord Markdown formatting: Inside masked links, instead of hiding the escape backslashes like everywhere else, it instead shows them. There is no way to prevent formatting inside masked links.

image

I reported a bug to Discord using their bug report tool. I also looked around in different places and it seems they keep this bug for "security reasons" https://github.com/discord/discord-api-docs/issues/6185#issuecomment-1666006809 , even if all other Markdowns do it right.

For example it works in GitHub Markdown: *format* -> format \*escaped\* -> *escaped* [*format*](http://a.b) -> format [\*wtfdiscord\*](http://a.b) -> *wtfdiscord*