diff mbox

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

Message ID 1443708774-26996-43-git-send-email-damien.lespiau@intel.com
State Accepted
Headers show

Commit Message

Damien Lespiau Oct. 1, 2015, 2:12 p.m. UTC
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@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
---
 patchwork/templates/patchwork/patch-list.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

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>