aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2018-07-12 18:48:28 +0100
committerGravatar Gareth Coles <[email protected]>2018-07-12 18:48:28 +0100
commit26e9475db9d295b8f8966032c18220834be040f7 (patch)
tree726c5374b812597b1802f959c4ae5933c6c8103f
parentMerge branch 'momo/snekbox-paste' into 'master' (diff)
[Snekbox] Better mention prevention
-rw-r--r--bot/cogs/snekbox.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bot/cogs/snekbox.py b/bot/cogs/snekbox.py
index 6bc333ff6..aa467b2bb 100644
--- a/bot/cogs/snekbox.py
+++ b/bot/cogs/snekbox.py
@@ -81,6 +81,9 @@ class Snekbox:
if "<@" in output:
output = output.replace("<@", "<@\u200B") # Zero-width space
+ if "<!@" in output:
+ output = output.replace("<!@", "<!@\u200B") # Zero-width space
+
if ESCAPE_REGEX.findall(output):
output = "Code block escape attempt detected; will not output result"
else: