From d0202ff809dacbc7ffafceb67e7f687bd7090fa4 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 8 Sep 2019 11:43:13 +0100 Subject: [PATCH] don't disregard matched backslashes before ampersand --- modules/sed.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/sed.py b/modules/sed.py index 23c06e76..bf6fa6ad 100644 --- a/modules/sed.py +++ b/modules/sed.py @@ -63,7 +63,7 @@ class Module(ModuleManager.BaseModule): if match: replace = sed_split[2] replace = replace.replace("\\/", "/") - replace = re.sub(SED_AMPERSAND, match.match, replace) + replace = re.sub(SED_AMPERSAND, "\\1%s" % match.match, replace) replace = utils.irc.bold(replace) new_message = re.sub(pattern, replace, match.line.message,