re.escape nicknames for highlight prevention
This commit is contained in:
parent
e483d4574b
commit
113a3b6405
1 changed files with 2 additions and 1 deletions
|
@ -485,7 +485,8 @@ class Module(ModuleManager.BaseModule):
|
|||
continue
|
||||
|
||||
regex = re.compile(r"(.)\b(%s)(%s)" % (
|
||||
user.nickname[0], user.nickname[1:]), re.I)
|
||||
re.escape(user.nickname[0]), re.escape(user.nickname[1:])),
|
||||
re.I)
|
||||
s = regex.sub("\\1\\2\u200c\\3", s)
|
||||
|
||||
return s
|
||||
|
|
Loading…
Reference in a new issue