From 701b0d2437408076f67246cf07a14c83f8d7700d Mon Sep 17 00:00:00 2001 From: Andrei Date: Mon, 24 Apr 2017 12:56:15 -0700 Subject: [PATCH] Bump holster, fix bug with sanitizing mentions --- disco/util/sanitize.py | 3 ++- requirements.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/disco/util/sanitize.py b/disco/util/sanitize.py index e12287e..e5ecf74 100644 --- a/disco/util/sanitize.py +++ b/disco/util/sanitize.py @@ -9,10 +9,11 @@ MODIFIER_GRAVE_ACCENT = u'\u02CB' # Regex which matches all possible mention combinations, this may be over-zealous # but its better safe than sorry. -MENTION_RE = re.compile('<[@|#][!|&]?([0-9]+)>|@everyone') +MENTION_RE = re.compile('<([@|#][!|&]?[0-9]+>|@everyone|@here)') def _re_sub_mention(mention): + mention = mention.group(1) if '#' in mention: return ZERO_WIDTH_SPACE.join(mention.split('#', 1)) elif '@' in mention: diff --git a/requirements.txt b/requirements.txt index cd7837b..a489053 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ gevent==1.2.1 -holster==1.0.12 +holster==1.0.13 inflection==0.3.1 requests==2.13.0 six==1.10.0