Bug #21794 fixed, folder names were not URI encoded

This commit is contained in:
Massimiliano Assante 2021-07-13 11:32:48 +02:00
parent fa373c0ff7
commit 0acb08f4ba
4 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -13,7 +13,7 @@
<artifactId>workspace-widget-portlet</artifactId>
<packaging>war</packaging>
<name>workspace-widget-portlet Portlet</name>
<version>1.5.1</version>
<version>1.5.1-SNAPSHOT</version>
<description>
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.
</description>

View File

@ -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];

View File

@ -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();
}