Skip to content

Commit

Permalink
SAK-33394 Sanitise commons input using FormattedText (sakaiproject#4833)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianfish authored Sep 26, 2017
1 parent e70905f commit 0de7fe8
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.sakaiproject.profile2.logic.ProfileConnectionsLogic;
import org.sakaiproject.profile2.model.BasicConnection;
import org.sakaiproject.profile2.util.ProfileConstants;
import org.sakaiproject.util.FormattedText;

import org.w3c.dom.Document;
import org.w3c.dom.Element;
Expand Down Expand Up @@ -111,6 +112,7 @@ public Post savePost(Post post) {

if (commonsSecurityManager.canCurrentUserEditPost(post)) {
try {
post.setContent(FormattedText.processFormattedText(post.getContent(), new StringBuilder(), true, false));
Post newOrUpdatedPost = persistenceManager.savePost(post);
if (newOrUpdatedPost != null) {
String commonsId = post.getCommonsId();
Expand Down

0 comments on commit 0de7fe8

Please sign in to comment.