I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Unverified Commit aaa1da4c authored by zzz's avatar zzz
Browse files

Plugins: console-icon path is relative to consoleLinkURL if specified,

otherwise relative to plugin name, as before
parent 8167f518
No related branches found
No related tags found
No related merge requests found
......@@ -486,9 +486,23 @@ public class PluginStarter implements Runnable {
String icfile = stripHTML(props, "console-icon");
if (icfile != null && !icfile.contains("..")) {
StringBuilder buf = new StringBuilder(32);
buf.append('/').append(appName);
if (!icfile.startsWith("/"))
String url = stripHTML(props, "consoleLinkURL");
if (url != null) {
if (url.endsWith(".html") || url.endsWith(".htm") || url.endsWith(".jsp") || url.endsWith("/home")) {
int slash = url.lastIndexOf('/');
if (slash > 0)
url = url.substring(0, slash);
}
} else {
url = appName;
}
if (!url.startsWith("/"))
buf.append('/');
buf.append(url);
if (!url.endsWith("/") && !icfile.startsWith("/"))
buf.append('/');
else if (url.endsWith("/") && icfile.startsWith("/"))
icfile = icfile.substring(1);
buf.append(icfile);
iconfile = buf.toString();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment