Fixing Incorrect URL when browsing Swift containers

This patch fixes a bug identified in the code that generates the URL for
the Swift container object. The bug caused the forward slashes (/) in the
folder parameter to be encoded as %2F instead of being included as '/' in the
resulting URL.

To resolve this issue, the code has been updated by adding a replace() method
to replace the %2F sequences with forward slashes. The updated code ensures
that the URL generated for the folder parameter contains the correct forward
slash (/) representation.

Closes-Bug: #2009724
Signed-off-by: jeremy-boyle <jeremyboylet@gmail.com>

Change-Id: I5837e74ddcc71cda6b4686e586dbb8b1386a9cd3
This commit is contained in:
jeremy-boyle 2023-06-24 16:59:11 +00:00 committed by Dmitriy Rabotyagov
parent 108c8c2043
commit 4aa347fe19

View File

@ -60,7 +60,8 @@
ctrl.containerURL = containerRoute + encodeURIComponent($routeParams.container) +
ctrl.model.DELIMETER;
if (angular.isDefined($routeParams.folder)) {
ctrl.currentURL = ctrl.containerURL + encodeURIComponent($routeParams.folder) +
ctrl.currentURL = ctrl.containerURL +
encodeURIComponent($routeParams.folder).replace(/%2F/g, '/') +
ctrl.model.DELIMETER;
} else {
ctrl.currentURL = ctrl.containerURL;