summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-10-08 11:22:15 +0100
committerDavid Baker <dave@matrix.org>2015-10-08 11:22:15 +0100
commit91482cd6a0285faa837d7bd503855aa002cd3034 (patch)
tree9096ed305807a87d43941289f18241a2886bc522
parentMerge pull request #292 from matrix-org/daniel/useragent (diff)
downloadsynapse-91482cd6a0285faa837d7bd503855aa002cd3034.tar.xz
Use raw string for regex here, otherwise \b is the backspace character. Fixes displayname matching.
-rw-r--r--synapse/push/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/push/__init__.py b/synapse/push/__init__.py
index f1952b5a0f..0e0c61dec8 100644
--- a/synapse/push/__init__.py
+++ b/synapse/push/__init__.py
@@ -186,7 +186,7 @@ class Pusher(object):
             if not display_name:
                 return False
             return re.search(
-                "\b%s\b" % re.escape(display_name), ev['content']['body'],
+                r"\b%s\b" % re.escape(display_name), ev['content']['body'],
                 flags=re.IGNORECASE
             ) is not None