diff --git a/vospace-ui-backend/src/main/java/it/inaf/ia2/vospace/ui/service/NodeInfo.java b/vospace-ui-backend/src/main/java/it/inaf/ia2/vospace/ui/service/NodeInfo.java index e7137bed9b1aaeb9c964674a2e70c6737a3ccae9..2108e33941d55eba03729a457d1d73a4be1ab62a 100644 --- a/vospace-ui-backend/src/main/java/it/inaf/ia2/vospace/ui/service/NodeInfo.java +++ b/vospace-ui-backend/src/main/java/it/inaf/ia2/vospace/ui/service/NodeInfo.java @@ -45,7 +45,7 @@ public class NodeInfo { public NodeInfo(Node node, User user, String authority, Node linkedNode) { this.authority = authority; this.path = getPath(node); - this.name = URLDecoder.decode(path.substring(path.lastIndexOf("/") + 1), StandardCharsets.UTF_8); + this.name = URLDecoder.decode(path.substring(path.lastIndexOf("/") + 1).replace("+", "%2B"), StandardCharsets.UTF_8); this.size = getSize(node); this.type = node.getType(); this.creator = getCreator(node); @@ -80,6 +80,7 @@ public class NodeInfo { private String decodePath(String uri, String prefix) { return String.join("/", Arrays.stream(uri.substring(prefix.length()).split("/")) + .map(p -> p.replace("+", "%2B")) .map(p -> URLDecoder.decode(p, StandardCharsets.UTF_8)) .collect(Collectors.toList())); }