From 4c3d82a1cc70d49833d4c2b9da78d8e460042882 Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Fri, 10 Feb 2017 10:49:29 -0800 Subject: [PATCH] Fix stripping of tag in reply_regexp The tag was being passed through `utils.strip_nasties()` which was removing all Unicode symbols even in UTF-8 mode. Instead, pass the bot variables through `format_message()` to give them the same treatment as normal messages. This fixes #80 some more. --- rivescript/brain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rivescript/brain.py b/rivescript/brain.py index c655354..f85ad0e 100644 --- a/rivescript/brain.py +++ b/rivescript/brain.py @@ -476,7 +476,7 @@ def reply_regexp(self, user, regexp): for var in bvars: rep = '' if var in self.master._var: - rep = utils.strip_nasties(self.master._var[var]) + rep = self.format_message(self.master._var[var]) regexp = regexp.replace(''.format(var=var), rep) # Filter in user variables.