>HTML markup is not only escaped as it was but also displayed as simple text
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/news-feed@181403 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
241486383b
commit
b6efac1e66
|
@ -1,12 +1,12 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="src" output="target/news-feed-2.8.1-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
<classpathentry kind="src" output="target/news-feed-2.8.2-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"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry excluding="**" kind="src" output="target/news-feed-2.8.1-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
<classpathentry excluding="**" kind="src" output="target/news-feed-2.8.2-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
|
@ -41,5 +41,5 @@
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="output" path="target/news-feed-2.8.1-SNAPSHOT/WEB-INF/classes"/>
|
<classpathentry kind="output" path="target/news-feed-2.8.2-SNAPSHOT/WEB-INF/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
lastWarOutDir=/Users/massi/Documents/workspace/news-feed/target/news-feed-2.8.1-SNAPSHOT
|
lastWarOutDir=/Users/massi/Documents/workspace/news-feed/target/news-feed-2.8.2-SNAPSHOT
|
||||||
warSrcDir=src/main/webapp
|
warSrcDir=src/main/webapp
|
||||||
warSrcDirIsOutput=false
|
warSrcDirIsOutput=false
|
||||||
|
|
|
@ -8,6 +8,9 @@
|
||||||
<dependent-module archiveName="gcube-widgets-2.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-widgets/gcube-widgets">
|
<dependent-module archiveName="gcube-widgets-2.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-widgets/gcube-widgets">
|
||||||
<dependency-type>uses</dependency-type>
|
<dependency-type>uses</dependency-type>
|
||||||
</dependent-module>
|
</dependent-module>
|
||||||
|
<dependent-module archiveName="social-util-library-1.6.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/social-util-library/social-util-library">
|
||||||
|
<dependency-type>uses</dependency-type>
|
||||||
|
</dependent-module>
|
||||||
<dependent-module archiveName="pickitem-widget-2.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/pickitem-widget/pickitem-widget">
|
<dependent-module archiveName="pickitem-widget-2.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/pickitem-widget/pickitem-widget">
|
||||||
<dependency-type>uses</dependency-type>
|
<dependency-type>uses</dependency-type>
|
||||||
</dependent-module>
|
</dependent-module>
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
<ReleaseNotes>
|
<ReleaseNotes>
|
||||||
|
<Changeset
|
||||||
|
component="org.gcube.portlets-user.news-feed.2-8-2" date="2019-08-02">
|
||||||
|
<Change>HTML markup is not only escaped as it was but also displayed as simple text</Change>
|
||||||
|
</Changeset>
|
||||||
<Changeset
|
<Changeset
|
||||||
component="org.gcube.portlets-user.news-feed.2-8-1" date="2019-07-17">
|
component="org.gcube.portlets-user.news-feed.2-8-1" date="2019-07-17">
|
||||||
<Change>Fixed Bug #17181, post editing leads to losing both formatting and mentions</Change>
|
<Change>Fixed Bug #17181, post editing leads to losing both formatting and mentions</Change>
|
||||||
|
|
5
pom.xml
5
pom.xml
|
@ -1,4 +1,5 @@
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -12,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>2.8.1-SNAPSHOT</version>
|
<version>2.8.2-SNAPSHOT</version>
|
||||||
|
|
||||||
<name>gCube News Feed Portlet</name>
|
<name>gCube News Feed Portlet</name>
|
||||||
<description>
|
<description>
|
||||||
|
|
|
@ -1357,6 +1357,7 @@ public class NewsFeedPanel extends Composite {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Comment comment = (Comment) result.getComment();
|
Comment comment = (Comment) result.getComment();
|
||||||
|
GWT.log("Returned Comment="+comment.getText());
|
||||||
owner.addComment(new SingleComment(comment, owner, (comment.getUserid().equals(myUserInfo.getUsername()))));
|
owner.addComment(new SingleComment(comment, owner, (comment.getUserid().equals(myUserInfo.getUsername()))));
|
||||||
owner.setCommentingDisabled(false);
|
owner.setCommentingDisabled(false);
|
||||||
owner.updateCommentsNumberCount();
|
owner.updateCommentsNumberCount();
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class SingleComment extends Composite {
|
||||||
String commentToShow = toShow.getText();
|
String commentToShow = toShow.getText();
|
||||||
|
|
||||||
//replace the < & and >
|
//replace the < & and >
|
||||||
commentToShow = commentToShow.replaceAll("<","<").replaceAll(">",">");
|
// commentToShow = commentToShow.replaceAll("<","<").replaceAll(">",">");
|
||||||
commentToShow = commentToShow.replaceAll("&","&");
|
commentToShow = commentToShow.replaceAll("&","&");
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -308,8 +308,8 @@ public class TweetTemplate extends Composite {
|
||||||
avatarImage.setUrl(post.getThumbnailURL());
|
avatarImage.setUrl(post.getThumbnailURL());
|
||||||
avatarImage.setPixelSize(40, 40);
|
avatarImage.setPixelSize(40, 40);
|
||||||
|
|
||||||
//replace the < & and >
|
// //replace the < & and >
|
||||||
postText = postText.replaceAll("<","<").replaceAll(">",">");
|
// postText = postText.replaceAll("<","<").replaceAll(">",">");
|
||||||
postText = postText.replaceAll("&","&");
|
postText = postText.replaceAll("&","&");
|
||||||
|
|
||||||
final String profilePageURL = GCubePortalConstants.PREFIX_GROUP_URL + NewsFeedPanel.extractOrgFriendlyURL(Location.getHref()) +GCubePortalConstants.USER_PROFILE_FRIENDLY_URL;
|
final String profilePageURL = GCubePortalConstants.PREFIX_GROUP_URL + NewsFeedPanel.extractOrgFriendlyURL(Location.getHref()) +GCubePortalConstants.USER_PROFILE_FRIENDLY_URL;
|
||||||
|
|
|
@ -776,12 +776,6 @@ public class NewsServiceImpl extends RemoteServiceServlet implements NewsService
|
||||||
if (newHashtags != null && !newHashtags.isEmpty())
|
if (newHashtags != null && !newHashtags.isEmpty())
|
||||||
store.saveHashTagsComment(toEdit.getKey(), vreIdFeed, newHashtags);
|
store.saveHashTagsComment(toEdit.getKey(), vreIdFeed, newHashtags);
|
||||||
|
|
||||||
// // get new hashtags
|
|
||||||
// String escapedCommentText = Utils.escapeHtmlAndTransformUrl(toEdit.getText());
|
|
||||||
// List<String> newHashtags = Utils.getHashTags(escapedCommentText);
|
|
||||||
// if (newHashtags != null && !newHashtags.isEmpty())
|
|
||||||
// escapedCommentText = Utils.convertHashtagsAnchorHTML(escapedCommentText, newHashtags);
|
|
||||||
|
|
||||||
edited = new Comment(toEdit.getKey(), toEdit.getUserid(),
|
edited = new Comment(toEdit.getKey(), toEdit.getUserid(),
|
||||||
toEdit.getTime(), toEdit.getFeedid(), escapedCommentText, user.getFullName(), user.getAvatarId(), true, new Date());
|
toEdit.getTime(), toEdit.getFeedid(), escapedCommentText, user.getFullName(), user.getAvatarId(), true, new Date());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue