diff options
| author | 2020-06-13 00:35:56 +0100 | |
|---|---|---|
| committer | 2020-06-13 00:35:56 +0100 | |
| commit | e2cc5793422179aef8b04bbf05892a103e2d8dc1 (patch) | |
| tree | f8301e706c01984664574c4c6158410312eb6ac3 | |
| parent | Replace mention of Flask with Django (diff) | |
| parent | Escape markdown in charinfo embed (diff) | |
Merge pull request #997 from python-discord/bug/frontend/996/charinfo-md-escape
Escape markdown in charinfo embed
| -rw-r--r-- | bot/cogs/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/cogs/utils.py b/bot/cogs/utils.py index 73b4a1c0a..697bf60ce 100644 --- a/bot/cogs/utils.py +++ b/bot/cogs/utils.py @@ -6,7 +6,7 @@ from email.parser import HeaderParser from io import StringIO from typing import Tuple, Union -from discord import Colour, Embed +from discord import Colour, Embed, utils from discord.ext.commands import BadArgument, Cog, Context, command from bot.bot import Bot @@ -145,7 +145,7 @@ class Utils(Cog): u_code = f"\\U{digit:>08}" url = f"https://www.compart.com/en/unicode/U+{digit:>04}" name = f"[{unicodedata.name(char, '')}]({url})" - info = f"`{u_code.ljust(10)}`: {name} - {char}" + info = f"`{u_code.ljust(10)}`: {name} - {utils.escape_markdown(char)}" return info, u_code charlist, rawlist = zip(*(get_info(c) for c in characters)) |