From d5860ac179e440791e565aa0b29edec86c94855d Mon Sep 17 00:00:00 2001 From: Joseph Nuthalapati Date: Mon, 22 Oct 2018 11:25:20 -0700 Subject: [PATCH] backups: Fix issue with showing exports from disks without labels When a disk does not have a label, its device path is used. This contains a '/' which by default is not encoded by 'urlencode' filter in Django templates. This leads to the expected URL not matching the regex in urls.py. Fix this by ensuring that '/' is also encoded by 'urlencode'. Reviewed-by: James Valleroy --- plinth/modules/backups/templates/backups.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plinth/modules/backups/templates/backups.html b/plinth/modules/backups/templates/backups.html index ecc03fbb6..e38c28f12 100644 --- a/plinth/modules/backups/templates/backups.html +++ b/plinth/modules/backups/templates/backups.html @@ -120,11 +120,11 @@ {{ name }} + href="{% url 'backups:download' label|urlencode:'' name|urlencode:'' %}"> {% trans "Download" %} + href="{% url 'backups:restore' label|urlencode:'' name|urlencode:'' %}"> {% trans "Restore" %}