fixed bug not displaying the http links
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/notifications@94351 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
67cdce8ef7
commit
6877631a46
|
@ -50,8 +50,8 @@ public class SingleNotificationView extends Composite {
|
|||
mainPanel.addStyleName("unread-notification");
|
||||
}
|
||||
String notificationToShow = toShow.getDescription();
|
||||
|
||||
String removeMarkup = notificationToShow.replaceAll("&", "&");
|
||||
GWT.log(notificationToShow);
|
||||
String removeMarkup = notificationToShow.replaceAll("&", "&").replaceAll("<","<").replaceAll(">",">");
|
||||
String actualHTML = new HTML(removeMarkup).getText();
|
||||
|
||||
//in case of links behave differently, i know is terrible //TODO: write better code here i think
|
||||
|
|
|
@ -84,6 +84,10 @@ public class NotificationsServiceImpl extends RemoteServiceServlet implements No
|
|||
System.out.println("SessionID = " + sessionID);
|
||||
return SessionManager.getInstance().getASLSession(sessionID, user);
|
||||
}
|
||||
/**
|
||||
* set the user in development mode
|
||||
* @return
|
||||
*/
|
||||
public String getDevelopmentUser() {
|
||||
String user = "test.user";
|
||||
//user = "massimiliano.assante";
|
||||
|
@ -125,6 +129,7 @@ public class NotificationsServiceImpl extends RemoteServiceServlet implements No
|
|||
try {
|
||||
for (Notification notification : store.getAllNotificationByUser(getASLSession().getUsername(), NotificationConstants.NOTIFICATION_NUMBER_PRE)) {
|
||||
Date dateWithoutTime = removeTimePart(notification.getTime());
|
||||
notification.setDescription(replaceAmpersand(notification.getDescription()));
|
||||
if (! toReturn.containsKey(dateWithoutTime)) {
|
||||
ArrayList<Notification> nots = new ArrayList<Notification>();
|
||||
nots.add(notification);
|
||||
|
@ -239,7 +244,11 @@ public class NotificationsServiceImpl extends RemoteServiceServlet implements No
|
|||
}
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
private String replaceAmpersand(String toReplace) {
|
||||
String toReturn = toReplace.replaceAll("&", "&");
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setUserNotificationPreferences(Map<NotificationType, NotificationChannelType[]> enabledChannels) {
|
||||
return store.setUserNotificationPreferences(getASLSession().getUsername(), enabledChannels);
|
||||
|
|
Loading…
Reference in New Issue