strip / suffix

This commit is contained in:
sneurlax 2023-03-07 14:55:28 -06:00
parent e4a9895120
commit 60ab907c28
2 changed files with 8 additions and 0 deletions

View file

@ -1789,5 +1789,9 @@ String formatAddress(String epicAddress) {
if (epicAddress.startsWith("mailto:")) {
epicAddress = epicAddress.replaceAll("mailto:", "");
}
// strip / suffix if the address contains an @ symbol (and is thus an epicbox address)
if (epicAddress.endsWith("/") && epicAddress.contains("@")) {
epicAddress = epicAddress.substring(0, epicAddress.length - 1);
}
return epicAddress;
}

View file

@ -1357,5 +1357,9 @@ String formatAddress(String epicAddress) {
if (epicAddress.startsWith("mailto:")) {
epicAddress = epicAddress.replaceAll("mailto:", "");
}
// strip / suffix if the address contains an @ symbol (and is thus an epicbox address)
if (epicAddress.endsWith("/") && epicAddress.contains("@")) {
epicAddress = epicAddress.substring(0, epicAddress.length - 1);
}
return epicAddress;
}