fixed see more problem with & s not being converted

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/news-feed@101640 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2014-11-18 17:23:58 +00:00
parent 0155184560
commit bdf7dd6b26
4 changed files with 9 additions and 5 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" output="target/news-feed-1.8.0-SNAPSHOT/WEB-INF/classes" path="src/main/java"> <classpathentry kind="src" output="target/news-feed-1.8.1-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes> <attributes>
<attribute name="optional" value="true"/> <attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
@ -31,5 +31,5 @@
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="output" path="target/news-feed-1.8.0-SNAPSHOT/WEB-INF/classes"/> <classpathentry kind="output" path="target/news-feed-1.8.1-SNAPSHOT/WEB-INF/classes"/>
</classpath> </classpath>

View File

@ -1,5 +1,5 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
jarsExcludedFromWebInfLib= jarsExcludedFromWebInfLib=
lastWarOutDir=/Users/massi/Documents/workspace/news-feed/target/news-feed-1.8.0-SNAPSHOT lastWarOutDir=/Users/massi/Documents/workspace/news-feed/target/news-feed-1.8.1-SNAPSHOT
warSrcDir=src/main/webapp warSrcDir=src/main/webapp
warSrcDirIsOutput=false warSrcDirIsOutput=false

View File

@ -13,7 +13,7 @@
<groupId>org.gcube.portlets.user</groupId> <groupId>org.gcube.portlets.user</groupId>
<artifactId>news-feed</artifactId> <artifactId>news-feed</artifactId>
<packaging>war</packaging> <packaging>war</packaging>
<version>1.8.0-SNAPSHOT</version> <version>1.8.1-SNAPSHOT</version>
<name>gCube News Feed Portlet</name> <name>gCube News Feed Portlet</name>
<description> <description>

View File

@ -292,10 +292,14 @@ public class TweetTemplate extends Composite {
@UiHandler("seeMore") @UiHandler("seeMore")
void onSeeMoreClick(ClickEvent e) { void onSeeMoreClick(ClickEvent e) {
String feedText = myFeed.getFeed().getDescription();
//replace the < & and >
feedText = feedText.replaceAll("&lt;","<").replaceAll("&gt;",">");
feedText = feedText.replaceAll("&amp;","&");
contentArea.setHTML("<a class=\"link\"href=\""+GCubeSocialNetworking.USER_PROFILE_LINK+"?"+ contentArea.setHTML("<a class=\"link\"href=\""+GCubeSocialNetworking.USER_PROFILE_LINK+"?"+
Encoder.encode(GCubeSocialNetworking.USER_PROFILE_OID)+"="+ Encoder.encode(GCubeSocialNetworking.USER_PROFILE_OID)+"="+
Encoder.encode(myFeed.getFeed().getEntityId())+"\">"+ Encoder.encode(myFeed.getFeed().getEntityId())+"\">"+
myFeed.getFeed().getFullName()+"</a> " + myFeed.getFeed().getDescription()); myFeed.getFeed().getFullName()+"</a> " + feedText);
seeMore.setHTML(""); seeMore.setHTML("");
} }