diff --git a/CHANGELOG.md b/CHANGELOG.md
index a169219..1e89f2e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,9 +4,10 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-## [v1.5.1] - 2021-05-25
+## [v1.5.1-SNAPSHOT] - 2021-05-25
- Feature #21507 support new UMATokensProvider class
+- Bug #21794 folder names were not URI encoded
## [v1.5.0] - 2021-04-06
diff --git a/pom.xml b/pom.xml
index 0a94793..de17b91 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,7 +13,7 @@
workspace-widget-portlet
war
workspace-widget-portlet Portlet
- 1.5.1
+ 1.5.1-SNAPSHOT
Workspace Widget Portlet is a small Front-end component looking like G Drive which exposes the content of the user's workspace or VRE Folders in read only mode.
diff --git a/src/main/java/org/gcube/portlets/user/wswidget/WorkspaceWidget.java b/src/main/java/org/gcube/portlets/user/wswidget/WorkspaceWidget.java
index 9728aa6..ca8a23b 100644
--- a/src/main/java/org/gcube/portlets/user/wswidget/WorkspaceWidget.java
+++ b/src/main/java/org/gcube/portlets/user/wswidget/WorkspaceWidget.java
@@ -104,9 +104,7 @@ public class WorkspaceWidget extends MVCPortlet {
} catch (StorageHubException e) {
e.printStackTrace();
}
- if (! (item instanceof ExternalURL || item instanceof ExternalLink)) {
-
-
+ if (! (item instanceof ExternalURL || item instanceof ExternalLink)) {
ServletResponseUtil.sendFile(httpReq,httpRes, streamDescr.getFileName(), streamDescr.getStream(), "application/download");
streamDescr.getStream().close();
}
@@ -116,6 +114,7 @@ public class WorkspaceWidget extends MVCPortlet {
String cmd = ParamUtil.getString(resourceRequest, "cmd", "");
String selectedItemId = "root";
String selectedItemName = "";
+ System.out.println("****\n\n\n*** String cmd2 ="+cmd);
if (cmd != null && cmd.split("_selectedName").length > 1) {
String[] splits = cmd.split("_selectedName");
selectedItemId = splits[0].split("=")[1];
diff --git a/src/main/webapp/html/workspacewidget/view.jsp b/src/main/webapp/html/workspacewidget/view.jsp
index 582062a..fd00554 100644
--- a/src/main/webapp/html/workspacewidget/view.jsp
+++ b/src/main/webapp/html/workspacewidget/view.jsp
@@ -91,7 +91,7 @@ $.fn.dataTable.ext.errMode = 'none';
function loadItemsListIntoTable(itemId, itemName, hideVreFolders) {
var table = $('#userTable').DataTable();
- table.ajax.url('<%=usersCustomDataSourceURL%>'+itemId+'_selectedName='+itemName).load();
+ table.ajax.url('<%=usersCustomDataSourceURL%>'+itemId+'_selectedName='+encodeURIComponent(itemName)).load();
if (hideVreFolders) {
$('#vreFoldersDiv').hide();
} else {
@@ -103,7 +103,7 @@ function loadItemsListIntoTable(itemId, itemName, hideVreFolders) {
function loadRecentItemsListIntoTable(itemId, itemName) {
var table = $('#userTable').DataTable();
- table.ajax.url('<%=usersCustomDataSourceURL%>'+itemId+'_selectedName='+itemName).load();
+ table.ajax.url('<%=usersCustomDataSourceURL%>'+itemId+'_selectedName='+encodeURIComponent(itemName)).load();
$('#userTable_info').hide();
$('#userTable_length').hide();
}