diff options
-rw-r--r-- | patchwork/templates/patchwork/patch.html | 2 | ||||
-rw-r--r-- | patchwork/templatetags/patch.py | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/patchwork/templates/patchwork/patch.html b/patchwork/templates/patchwork/patch.html index f379317..d73377f 100644 --- a/patchwork/templates/patchwork/patch.html +++ b/patchwork/templates/patchwork/patch.html @@ -43,7 +43,7 @@ function toggle_headers(link_id, headers_id) <table class="patchmeta"> <tr> <th>Message ID</th> - <td>{{ patch.msgid }}</td> + <td>{{ patch.msgid|msgid }}</td> </tr> <tr> <th>State</th> 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('<>')) |