From: Damien Lespiau Date: Sun, 25 Oct 2015 23:18:37 +0000 (+0000) Subject: ui: Don't display the '<' and '>' characters in the message-id X-Git-Tag: v1.1.0~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b053a53c50b7c7a5d974dccecb3545ab36c7998;p=thirdparty%2Fpatchwork.git ui: Don't display the '<' and '>' characters in the message-id Suggested-by: Jani Nikula Signed-off-by: Damien Lespiau Acked-by: Stephen Finucane --- diff --git a/patchwork/templates/patchwork/patch.html b/patchwork/templates/patchwork/patch.html index f3793179..d73377f8 100644 --- a/patchwork/templates/patchwork/patch.html +++ b/patchwork/templates/patchwork/patch.html @@ -43,7 +43,7 @@ function toggle_headers(link_id, headers_id) - + diff --git a/patchwork/templatetags/patch.py b/patchwork/templatetags/patch.py index 90519e6e..c65bd5ea 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('<>'))
Message ID{{ patch.msgid }}{{ patch.msgid|msgid }}
State