FIXED the wrong html encoding problem
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/application-support-layer/applicationSupportLayerSocial@119820 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
c5f4f94296
commit
01727dcfb3
|
@ -465,9 +465,9 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
|
|||
|
||||
StringBuilder notificationText = new StringBuilder();
|
||||
notificationText.append("posted a news on <b> ").append(aslSession.getGroupName()).append(":</b>") // has done something
|
||||
.append("<br /><br /> ").append(escapeHtml(feedText)).append(" ")
|
||||
.append("<br /><br />Follow the discussion and comment it. ");
|
||||
|
||||
.append("<br /><br /> ").append(feedText).append(" ")
|
||||
.append("<br /><br />");
|
||||
|
||||
Notification not = new Notification(
|
||||
UUID.randomUUID().toString(),
|
||||
NotificationType.POST_ALERT,
|
||||
|
@ -495,8 +495,9 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
|
|||
new Date(),
|
||||
getApplicationUrl()+"?oid="+feedid,
|
||||
"commented on your post: "
|
||||
+ "<div style=\"margin-top: 10px; margin-bottom: 10px; margin-left: 50px; padding-left: 15px; border-left: 3px solid #ccc; font-style: italic;\">\""
|
||||
+ escapeHtml(feedText) +"\"</div>",
|
||||
+ "<div style=\"margin-top: 10px; margin-bottom: 10px; margin-left: 50px; padding-left: 15px; "
|
||||
+ "border-left: 3px solid #ccc; font-style: italic;\">\""
|
||||
+ feedText +"\"</div>",
|
||||
false,
|
||||
aslSession.getUsername(),
|
||||
aslSession.getUserFullName(),
|
||||
|
@ -511,11 +512,11 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
|
|||
String notificationText = (aslSession.getUsername().compareTo(feedOwnerId) == 0) ?
|
||||
"also commented on his post: "
|
||||
+ "<div style=\"margin-top: 10px; margin-bottom: 10px; margin-left: 50px; padding-left: 15px; border-left: 3px solid #ccc; font-style: italic;\">\""
|
||||
+ escapeHtml(commentText) +"\"</div>"
|
||||
+ commentText +"\"</div>"
|
||||
:
|
||||
"also commented on " + feedOwnerFullName + "'s post: "
|
||||
+ "<div style=\"margin-top: 10px; margin-bottom: 10px; margin-left: 50px; padding-left: 15px; border-left: 3px solid #ccc; font-style: italic;\">\""
|
||||
+ escapeHtml(commentText) +"\"</div>";
|
||||
+ commentText +"\"</div>";
|
||||
Notification not = new Notification(
|
||||
UUID.randomUUID().toString(),
|
||||
NotificationType.COMMENT,
|
||||
|
@ -544,7 +545,7 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
|
|||
getApplicationUrl()+"?oid="+feedid,
|
||||
"commented on one of your favorite posts: "
|
||||
+ "<div style=\"margin-top: 10px; margin-bottom: 10px; margin-left: 50px; padding-left: 15px; border-left: 3px solid #ccc; font-style: italic;\">\""
|
||||
+ escapeHtml(commentText) +"\"</div>",
|
||||
+ commentText +"\"</div>",
|
||||
false,
|
||||
aslSession.getUsername(),
|
||||
aslSession.getUserFullName(),
|
||||
|
@ -564,7 +565,7 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
|
|||
new Date(),
|
||||
getApplicationUrl()+"?oid="+feedid,
|
||||
"mentioned you: " + "<div style=\"margin-top: 10px; margin-bottom: 10px; margin-left: 50px; padding-left: 15px; border-left: 3px solid #ccc; font-style: italic;\">\""
|
||||
+ escapeHtml(feedText) +"\"</div>",
|
||||
+ feedText +"\"</div>",
|
||||
false,
|
||||
aslSession.getUsername(),
|
||||
aslSession.getUserFullName(),
|
||||
|
|
|
@ -52,11 +52,7 @@ public class EmailPlugin {
|
|||
protected static ArrayList<NotificationMail> BUFFER_EMAILS = new ArrayList<NotificationMail>();
|
||||
|
||||
private static String getHTMLEmail(Notification notification2Save, String userFirstName, String portalURL, String email, String ... hashtags) {
|
||||
|
||||
String removedMarkup = notification2Save.getDescription().replaceAll("&", "&");
|
||||
removedMarkup = removedMarkup.replaceAll(">", ">");
|
||||
removedMarkup = removedMarkup.replaceAll("<", "<");
|
||||
|
||||
if (hashtags != null && hashtags.length > 0) {
|
||||
_log.debug("editing hyperlinks for mail client");
|
||||
//notification2Save uri contains the absoulte path to the feed in the correct channel, e.g. /group/ustore_vre?oid=f1637958-34d0-48fc-b5ad-13b1116e389d
|
||||
|
|
Loading…
Reference in New Issue