- return getCleanDataPath(node);
- }
-
- /** Clean special character from the URL. */
- protected String getCleanDataPath(Node node) throws RepositoryException {
- String path = CmsUiUtils.getDataPath(node);
- StringTokenizer st = new StringTokenizer(path, "/");
- StringBuilder sb = new StringBuilder();
- while (st.hasMoreElements()) {
- sb.append('/');
- String encoded = URLEncoder.encode(st.nextToken(), StandardCharsets.UTF_8);
- encoded = encoded.replace("+", "%20");
- sb.append(encoded);
-
- }
- return sb.toString();