diff options
| author | 2018-07-12 18:48:28 +0100 | |
|---|---|---|
| committer | 2018-07-12 18:48:28 +0100 | |
| commit | 26e9475db9d295b8f8966032c18220834be040f7 (patch) | |
| tree | 726c5374b812597b1802f959c4ae5933c6c8103f | |
| parent | Merge branch 'momo/snekbox-paste' into 'master' (diff) | |
[Snekbox] Better mention prevention
| -rw-r--r-- | bot/cogs/snekbox.py | 3 |
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: |