]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
patch-list: Limit the number of chars to 100 for the patch subject
authorDamien Lespiau <damien.lespiau@intel.com>
Sat, 8 Nov 2014 15:43:36 +0000 (15:43 +0000)
committerStephen Finucane <stephen.finucane@intel.com>
Thu, 5 Nov 2015 03:56:25 +0000 (03:56 +0000)
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

index 9de5c52995fc33f5b7f6e926a4f0208e5a55f212..8f48dbc961f3636be3397eb5070a3b2deadc5061 100644 (file)
@@ -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>