[PATCH 46/46] patch-list: Limit the number of chars to 100 for the patch subject

Damien Lespiau damien.lespiau at intel.com
Sun Nov 9 06:09:04 AEDT 2014


It can happen that people send a patch with a huge subject, by mistake.
Make sure it can interfere too much with the list of patches.

As an email subject can include extra words compared to a patch subject
(list header, tags, ...) let's have a slightly larger limit than 72 or
80.

Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
---
 templates/patchwork/patch-list.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/templates/patchwork/patch-list.html b/templates/patchwork/patch-list.html
index 084b5c6..f10af8a 100644
--- a/templates/patchwork/patch-list.html
+++ b/templates/patchwork/patch-list.html
@@ -142,7 +142,7 @@ $(document).ready(function() {
     </td>
     {% endif %}
    <td><a href="{% url 'patchwork.views.patch.patch' patch_id=patch.id %}"
-     >{{ patch.name|default:"[no subject]" }}</a></td>
+     >{{ patch.name|default:"[no subject]"|truncatechars:100 }}</a></td>
    <td>{{ patch.date|date:"Y-m-d" }}</td>
    <td>{{ patch.submitter|personify }}</td>
    <td>{{ patch.delegate.username }}</td>
-- 
1.8.3.1



More information about the Patchwork mailing list