diff --git a/gestioncof/templates/gestioncof/search_results.html b/gestioncof/templates/gestioncof/search_results.html
index ba8b6580..126649b6 100644
--- a/gestioncof/templates/gestioncof/search_results.html
+++ b/gestioncof/templates/gestioncof/search_results.html
@@ -1,4 +1,4 @@
-{% load utils %}
+{% load search_utils %}
{% if members %}
diff --git a/gestioncof/templatetags/utils.py b/gestioncof/templatetags/utils.py
index 21518614..6b2122b6 100644
--- a/gestioncof/templatetags/utils.py
+++ b/gestioncof/templatetags/utils.py
@@ -1,7 +1,4 @@
-import re
-
from django import template
-from django.utils.safestring import mark_safe
register = template.Library()
@@ -15,29 +12,3 @@ def key(d, key_name):
value = settings.TEMPLATE_STRING_IF_INVALID
return value
-
-
-def highlight_text(text, q):
- q2 = "|".join(re.escape(word) for word in q.split())
- pattern = re.compile(r"(?P%s)" % q2, re.IGNORECASE)
- return mark_safe(
- re.sub(pattern, r"\g", text)
- )
-
-
-@register.filter
-def highlight_user(user, q):
- if user.first_name and user.last_name:
- text = "%s %s (%s)" % (user.first_name, user.last_name, user.username)
- else:
- text = user.username
- return highlight_text(text, q)
-
-
-@register.filter
-def highlight_clipper(clipper, q):
- if clipper.fullname:
- text = "%s (%s)" % (clipper.fullname, clipper.clipper)
- else:
- text = clipper.clipper
- return highlight_text(text, q)
diff --git a/gestioncof/templatetags/__init__.py b/shared/templatetags/__init__.py
similarity index 100%
rename from gestioncof/templatetags/__init__.py
rename to shared/templatetags/__init__.py
diff --git a/shared/templatetags/search_utils.py b/shared/templatetags/search_utils.py
new file mode 100644
index 00000000..28851248
--- /dev/null
+++ b/shared/templatetags/search_utils.py
@@ -0,0 +1,32 @@
+import re
+
+from django import template
+from django.utils.safestring import mark_safe
+
+register = template.Library()
+
+
+def highlight_text(text, q):
+ q2 = "|".join(re.escape(word) for word in q.split())
+ pattern = re.compile(r"(?P%s)" % q2, re.IGNORECASE)
+ return mark_safe(
+ re.sub(pattern, r"\g", text)
+ )
+
+
+@register.filter
+def highlight_user(user, q):
+ if user.first_name and user.last_name:
+ text = "%s %s (%s)" % (user.first_name, user.last_name, user.username)
+ else:
+ text = user.username
+ return highlight_text(text, q)
+
+
+@register.filter
+def highlight_clipper(clipper, q):
+ if clipper.fullname:
+ text = "%s (%s)" % (clipper.fullname, clipper.clipper)
+ else:
+ text = clipper.clipper
+ return highlight_text(text, q)