Can't browse directories with spaces in inventory ui

Bug #336408 reported by Peter Bui
2
Affects Status Importance Assigned to Milestone
loggerhead
Fix Released
Undecided
Michael Hudson-Doyle

Bug Description

If there is a directory with spaces in the name like "Example Folder", the inventory ui code uses urllib.quote to set the absolutepath to "Example%20Folder", which is correct. The probem is that the inventory.pt template then uses the url function to construct the full href and in turn also performs a quoting. Since it sees %20 in the string, it expands it to %2520, to make the final string "Example%2520Folder". As such, the href is invalid and the end result is that users cannot browse directories with spaces in them.

The solution is to not perform the initial quote, in the inventory_ui code and let the url function in the template do the quoting, thus preventing double escaping. Attached is the simple patch to fix this.

Revision history for this message
Peter Bui (pnutzh4x0r) wrote :
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Thanks, applied.

Changed in loggerhead:
assignee: nobody → mwhudson
status: New → Fix Committed
Martin Albisetti (beuno)
Changed in loggerhead:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.