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

Damien Lespiau damien.lespiau at intel.com
Tue Aug 25 04:23:32 AEST 2015


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>
---
 patchwork/templates/patchwork/patch-list.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/patchwork/templates/patchwork/patch-list.html b/patchwork/templates/patchwork/patch-list.html
index 9de5c52..8f48dbc 100644
--- a/patchwork/templates/patchwork/patch-list.html
+++ b/patchwork/templates/patchwork/patch-list.html
@@ -152,7 +152,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 style="white-space: nowrap;">{{ patch|patch_tags }}</td>
    <td>{{ patch.date|date:"Y-m-d" }}</td>
    <td>{{ patch.submitter|personify:project }}</td>
-- 
2.1.0



More information about the Patchwork mailing list