aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar mina <[email protected]>2022-04-21 22:54:14 -0400
committerGravatar GitHub <[email protected]>2022-04-21 22:54:14 -0400
commitc2d1538c4357eaf8849aad506a2fc67c658d51a6 (patch)
treee6b5eab8f06091b6014703fdd63ae5292294bcb2
parentMerge pull request #2133 from python-discord/slowmode/add-better-thread-support (diff)
Add support for BIG SOLIDUS unicode characters in off topic names (#2146)
Make `ALLOWED_CHARACTERS` a raw string to account for slashes
-rw-r--r--bot/converters.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/converters.py b/bot/converters.py
index 7393a1ddc..910ed9e39 100644
--- a/bot/converters.py
+++ b/bot/converters.py
@@ -382,8 +382,8 @@ class Age(DurationDelta):
class OffTopicName(Converter):
"""A converter that ensures an added off-topic name is valid."""
- ALLOWED_CHARACTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ!?'`-<>"
- TRANSLATED_CHARACTERS = "๐– ๐–ก๐–ข๐–ฃ๐–ค๐–ฅ๐–ฆ๐–ง๐–จ๐–ฉ๐–ช๐–ซ๐–ฌ๐–ญ๐–ฎ๐–ฏ๐–ฐ๐–ฑ๐–ฒ๐–ณ๐–ด๐–ต๐–ถ๐–ท๐–ธ๐–นวƒ๏ผŸโ€™โ€™-๏ผœ๏ผž"
+ ALLOWED_CHARACTERS = r"ABCDEFGHIJKLMNOPQRSTUVWXYZ!?'`-<>\/"
+ TRANSLATED_CHARACTERS = "๐– ๐–ก๐–ข๐–ฃ๐–ค๐–ฅ๐–ฆ๐–ง๐–จ๐–ฉ๐–ช๐–ซ๐–ฌ๐–ญ๐–ฎ๐–ฏ๐–ฐ๐–ฑ๐–ฒ๐–ณ๐–ด๐–ต๐–ถ๐–ท๐–ธ๐–นวƒ๏ผŸโ€™โ€™-๏ผœ๏ผžโงนโงธ"
@classmethod
def translate_name(cls, name: str, *, from_unicode: bool = True) -> str: