diff --git a/layerindex/forms.py b/layerindex/forms.py
index b0ffc31..733adc2 100644
--- a/layerindex/forms.py
+++ b/layerindex/forms.py
@@ -136,7 +136,7 @@ class EditLayerForm(StyledModelForm):
     def clean_summary(self):
         # Compress whitespace and use only spaces
         summary = self.cleaned_data['summary'].strip()
-        summary = re.sub('\s+', ' ', summary)
+        summary = re.sub(r'\s+', ' ', summary)
         return summary
 
     def clean_layer_type(self):
diff --git a/layerindex/models.py b/layerindex/models.py
index 1a2ec60..a72a72b 100644
--- a/layerindex/models.py
+++ b/layerindex/models.py
@@ -278,7 +278,7 @@ class LayerBranch(models.Model):
             url = base_url.replace('%branch%', branchname)
             if path:
                 splitpath = path.split('/')
-                for match in re.findall('(%pathelement\[([0-9]*)(:[0-9]*)?\]%)', url):
+                for match in re.findall(r'(%pathelement\[([0-9]*)(:[0-9]*)?\]%)', url):
                     if match[1] == '':
                         start = None
                     else:
diff --git a/layerindex/utils.py b/layerindex/utils.py
index 6c0ad8f..7e7ebe4 100644
--- a/layerindex/utils.py
+++ b/layerindex/utils.py
@@ -528,7 +528,7 @@ def sanitise_html(html):
     return soup.renderContents()
 
 def squashspaces(string):
-    return re.sub("\s+", " ", string).strip()
+    return re.sub(r"\s+", " ", string).strip()
 
 def sha256_file(ifn):
     import hashlib
