Open TimJentzsch opened 2 years ago
The usernames in the response for the /leaderboard command are currently not escaped, that means that formatting characters in the usernames (e.g. / or *) mess up the formatting.
/leaderboard
/
*
The fix should be very easy:
Edit this line to be username = escape_formatting(user["username"]): https://github.com/GrafeasGroup/buttercup/blob/e2d69b286d5ad7f009aa6a428104e8def1df26a9/buttercup/cogs/leaderboard.py#L32
username = escape_formatting(user["username"])
And don't forget to import the corresponding function from the helper file: https://github.com/GrafeasGroup/buttercup/blob/e2d69b286d5ad7f009aa6a428104e8def1df26a9/buttercup/cogs/helpers.py#L134-L136
The usernames in the response for the
/leaderboard
command are currently not escaped, that means that formatting characters in the usernames (e.g./
or*
) mess up the formatting.The fix should be very easy:
Edit this line to be
username = escape_formatting(user["username"])
: https://github.com/GrafeasGroup/buttercup/blob/e2d69b286d5ad7f009aa6a428104e8def1df26a9/buttercup/cogs/leaderboard.py#L32And don't forget to import the corresponding function from the helper file: https://github.com/GrafeasGroup/buttercup/blob/e2d69b286d5ad7f009aa6a428104e8def1df26a9/buttercup/cogs/helpers.py#L134-L136