Skip to content

Commit

Permalink
patch: Don't display the '<' and '>' characters in the message-id
Browse files Browse the repository at this point in the history
Fixes #54: #54
Suggested-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
  • Loading branch information
Damien Lespiau committed Oct 25, 2015
1 parent ebe2358 commit 10a6ddb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion patchwork/templates/patchwork/patch.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ <h2>Details</h2>
<table class="patchmeta">
<tr>
<th>Message ID</th>
<td>{{ patch.msgid }}</td>
<td>{{ patch.msgid|msgid }}</td>
</tr>
<tr>
<th>State</th>
Expand Down
7 changes: 7 additions & 0 deletions patchwork/templatetags/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

from django import template
from django.utils.safestring import mark_safe
from django.template.defaultfilters import stringfilter

register = template.Library()

Expand All @@ -31,3 +32,9 @@ def patch_tags(patch, tag):
title = '%d %s' % (count, tag.name)
return mark_safe('<td class="%s"><span title="%s">%s</span></td>' %
(class_str, title, count_str))


@register.filter
@stringfilter
def msgid(patch):
return patch.strip('<>')

0 comments on commit 10a6ddb

Please sign in to comment.