url encoded at server side

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/widgets/ckan-metadata-publisher-widget@133832 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-11-02 22:10:44 +00:00
parent 1fef1620da
commit f00a350156
1 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,6 @@
package org.gcube.portlets.widgets.ckandatapublisherwidget.server;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
@ -383,7 +384,7 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C
toCreate.setId(datasetId);
// retrieve the url
String datasetUrl = utils.getPortletUrl() + "?path=" + utils.getUrlFromDatasetIdOrName(getUserCKanTokenFromSession(scope), datasetId, true);
String datasetUrl = utils.getPortletUrl() + "?" + URLEncoder.encode("path=" + utils.getUrlFromDatasetIdOrName(getUserCKanTokenFromSession(scope), datasetId, true), "UTF-8");
toCreate.setSource(datasetUrl);
// start a thread that will associate this dataset with the group
@ -400,7 +401,7 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C
threadAssociationToGroup.start();
}
// launch notification thread
WritePostCatalogueManagerThread threadWritePost =
new WritePostCatalogueManagerThread(
@ -408,7 +409,7 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C
scope,
toCreate.getTitle(),
datasetUrl,
true, // send notification to other people
false, // send notification to other people
toCreate.getTags(),
toCreate.getAuthorFullName()
);