Merged V3.1 to HEAD

13352: Fix for ETHREEOH-1216: Line breaks in forums posts from earlier earlier versions don't work 
      - Added <br/> to list of safe tags so that old forum posts containing it render properly 
      - Edit post dialog updated to replace <br/> tags as well as <br> when editing

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13354 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2009-02-25 13:17:48 +00:00
parent 91e042144c
commit 77f60cebb4

View File

@@ -65,6 +65,9 @@ public class EditPostDialog extends CreatePostDialog
String htmlContent = reader.getContentString(); String htmlContent = reader.getContentString();
if (htmlContent != null) if (htmlContent != null)
{ {
// ETHREEOH-1216: replace both forms of 'br' as older posts have the <br/> version
// which doesn't work in all browsers supported by Alfresco Explorer
htmlContent = StringUtils.replace(htmlContent, "<br/>", "\r\n");
this.content = StringUtils.replace(htmlContent, "<br>", "\r\n"); this.content = StringUtils.replace(htmlContent, "<br>", "\r\n");
} }
} }