replaced all the line breaks by <br/>, and all the double spaces by the html version to preserve new lines in posts.
git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portlets/user/share-updates@92964 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
65822d43ec
commit
8fed2ab7cf
|
@ -134,8 +134,8 @@ public class ShareUpdateServiceImpl extends RemoteServiceServlet implements Shar
|
|||
if (user == null) {
|
||||
_log.warn("USER IS NULL setting test.user and Running OUTSIDE PORTAL");
|
||||
user = "test.user";
|
||||
// user = "massimiliano.assante";
|
||||
// SessionManager.getInstance().getASLSession(sessionID, user).setScope("/gcube/devsec/devVRE");
|
||||
user = "massimiliano.assante";
|
||||
SessionManager.getInstance().getASLSession(sessionID, user).setScope("/gcube/devsec/devVRE");
|
||||
withinPortal = false;
|
||||
}
|
||||
else {
|
||||
|
@ -562,8 +562,14 @@ public class ShareUpdateServiceImpl extends RemoteServiceServlet implements Shar
|
|||
if (html == null) {
|
||||
return null;
|
||||
}
|
||||
return html.replaceAll("&", "&").replaceAll("<", "<")
|
||||
String toReturn = html.replaceAll("&", "&").replaceAll("<", "<")
|
||||
.replaceAll(">", ">");
|
||||
|
||||
// then replace all the line breaks by <br/>, and all the double spaces by the html version
|
||||
toReturn = toReturn.replaceAll("(\r\n|\n)","<br />");
|
||||
toReturn = toReturn.replaceAll("\\s\\s"," ");
|
||||
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue