in the HTML mail embed the link as a <a> element

Change-Id: I5c89ddf6de6872ca0991f5e738b0d8e1d5907c66
This commit is contained in:
Axel Uhl committed 2016-07-15 19:59:00 +02:00
1 parent 6c199d8598
commit 568d6cd767
1 file changed
+1 -10
@@ -1,15 +1,12 @@
package com.sap.sailing.server.notification.impl;
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLEncoder;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Locale;
import java.util.Set;
import java.util.function.BiConsumer;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.osgi.framework.BundleContext;
@@ -284,13 +281,7 @@ public class SailingNotificationServiceImpl implements Stoppable, SailingNotific
private String encodeLink(String link) {
String encodedLink;
try {
encodedLink = URLEncoder.encode(link, "UTF-8");
} catch (UnsupportedEncodingException e) {
logger.log(Level.WARNING, "Why is UTF-8 not known?", e);
encodedLink = link;
}
String encodedLink = "<a href=\""+link+"\">"+link.replace("&", "&amp;")+"</a>";
return encodedLink;
}