From e41b270f1b181f7158ab0bd5a69c6c93638eaa20 Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Sat, 19 Oct 2019 13:07:07 +0300 Subject: [PATCH] Fix recursive replacement in NetworkPageExporter A replacer could replace same String multiple times and produce ../../../../server/ instead of intended ../server/ Changed method call from replace to replaceOnce A single instance of server/ exists in the file. Affected issues: - Possibly fixed #1195 --- .../djrapitops/plan/delivery/export/NetworkPageExporter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plan/common/src/main/java/com/djrapitops/plan/delivery/export/NetworkPageExporter.java b/Plan/common/src/main/java/com/djrapitops/plan/delivery/export/NetworkPageExporter.java index 6cd42d5ee..c6fc32bd2 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/delivery/export/NetworkPageExporter.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/delivery/export/NetworkPageExporter.java @@ -188,7 +188,7 @@ public class NetworkPageExporter extends FileExporter { export(to, theme.replaceThemeColors(resource.asString())); } else if ("js/network-values.js".equalsIgnoreCase(resourceName)) { // Replace /server in urls to fix server page links - export(to, StringUtils.replace(resource.asString(), "server/", toRelativePathFromRoot("server") + '/')); + export(to, StringUtils.replaceOnce(resource.asString(), "server/", toRelativePathFromRoot("server") + '/')); } else { export(to, resource.asLines()); }