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

Skip to content
Snippets Groups Projects
Verified Commit 16396731 authored by zzz's avatar zzz
Browse files

Console: Improve parsing of email address for mailto: link on /plugins

parent 75734448
No related branches found
No related tags found
No related merge requests found
......@@ -302,10 +302,19 @@ public class ConfigClientsHelper extends HelperBase {
}
s = stripHTML(appProps, "author");
if (s != null) {
String[] authors = DataHelper.split(s, "[,; \r\n\t]");
String author = null;
for (int i = 0; i < authors.length; i++) {
String a = authors[i];
if (a.indexOf('@') > 0 && a.indexOf('.') > 0) {
author = a;
break;
}
}
desc.append("<tr><td><b>")
.append(_t("Author")).append("</b></td><td>");
if (s.indexOf('@') > 0)
desc.append("<a href=\"mailto:").append(s).append("\">").append(s).append("</a>");
if (author != null)
desc.append("<a href=\"mailto:").append(author).append("\">").append(s).append("</a>");
else
desc.append(s);
}
......
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