summaryrefslogtreecommitdiff
path: root/patchwork/templatetags
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2015-10-25 23:18:37 +0000
committerStephen Finucane <stephen.finucane@intel.com>2016-02-08 19:03:34 +0000
commit0b053a53c50b7c7a5d974dccecb3545ab36c7998 (patch)
tree05e025df69dba73a79b0dd58b8a2f06271bee070 /patchwork/templatetags
parent782d4dba22c66d629c33866cbc128dd6a9638b31 (diff)
downloadpatchwork-0b053a53c50b7c7a5d974dccecb3545ab36c7998.tar
patchwork-0b053a53c50b7c7a5d974dccecb3545ab36c7998.tar.gz
ui: Don't display the '<' and '>' characters in the message-id
Suggested-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Stephen Finucane <stephen.finucane@intel.com>
Diffstat (limited to 'patchwork/templatetags')
-rw-r--r--patchwork/templatetags/patch.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/patchwork/templatetags/patch.py b/patchwork/templatetags/patch.py
index 90519e6..c65bd5e 100644
--- a/patchwork/templatetags/patch.py
+++ b/patchwork/templatetags/patch.py
@@ -22,6 +22,7 @@ from __future__ import absolute_import
from django import template
from django.utils.safestring import mark_safe
+from django.template.defaultfilters import stringfilter
from patchwork.models import Check
@@ -59,3 +60,9 @@ def patch_checks(patch):
@register.filter(name='state_class')
def state_class(state):
return '-'.join(state.split())
+
+
+@register.filter
+@stringfilter
+def msgid(value):
+ return mark_safe(value.strip('<>'))