]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
ui: Don't display the '<' and '>' characters in the message-id
authorDamien Lespiau <damien.lespiau@intel.com>
Sun, 25 Oct 2015 23:18:37 +0000 (23:18 +0000)
committerStephen Finucane <stephen.finucane@intel.com>
Mon, 8 Feb 2016 19:03:34 +0000 (19:03 +0000)
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>
patchwork/templates/patchwork/patch.html
patchwork/templatetags/patch.py

index f3793179f457e8c1f4587dbac70a34a3cb668a8a..d73377f85391e9c0043f20bdbe4ad1bae4eb4486 100644 (file)
@@ -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>
index 90519e6e3d9851037f7ee980272aafd5011d52cd..c65bd5eae7a3967a8d8349e0fb05a7a825d45c83 100644 (file)
@@ -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('<>'))