mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-02 14:37:45 +01:00
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
This commit is contained in:
parent
d07c83e111
commit
e41b270f1b
@ -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());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user