mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
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 <jvalleroy@mailbox.org>
This commit is contained in:
parent
41b8c16a68
commit
d5860ac179
@ -120,11 +120,11 @@
|
||||
<td class="export-name">{{ name }}</td>
|
||||
<td class="export-operations">
|
||||
<a class="download btn btn-sm btn-default" target="_blank"
|
||||
href="{% url 'backups:download' label|urlencode name|urlencode %}">
|
||||
href="{% url 'backups:download' label|urlencode:'' name|urlencode:'' %}">
|
||||
{% trans "Download" %}
|
||||
</a>
|
||||
<a class="restore btn btn-sm btn-default"
|
||||
href="{% url 'backups:restore' label|urlencode name|urlencode %}">
|
||||
href="{% url 'backups:restore' label|urlencode:'' name|urlencode:'' %}">
|
||||
{% trans "Restore" %}
|
||||
</a>
|
||||
</td>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user