mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Cleanup of duplicated code in Utils (webclient) and StringUtils (webscriptframework).
Change header case check to case-insensitive in RemoteClient. Addition of helper object to Script root scope for WebScripts - 'scriptUtils' with helper methods for encoding and stripping of HTML/JS etc. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10216 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -66,8 +66,8 @@ public class CreatePostDialog extends CreateContentWizard
|
||||
this.mimeType = Repository.getMimeTypeForFileName(
|
||||
FacesContext.getCurrentInstance(), this.fileName);
|
||||
|
||||
// remove link breaks and replace with <br/>
|
||||
this.content = Utils.replaceLineBreaks(this.content);
|
||||
// remove link breaks and replace with <br>
|
||||
this.content = Utils.replaceLineBreaks(this.content, false);
|
||||
|
||||
return super.finishImpl(context, outcome);
|
||||
}
|
||||
|
@@ -61,8 +61,8 @@ public class CreateReplyDialog extends CreatePostDialog
|
||||
@Override
|
||||
protected String finishImpl(FacesContext context, String outcome) throws Exception
|
||||
{
|
||||
// remove link breaks and replace with <br/>
|
||||
this.content = Utils.replaceLineBreaks(this.content);
|
||||
// remove link breaks and replace with <br>
|
||||
this.content = Utils.replaceLineBreaks(this.content, false);
|
||||
|
||||
super.finishImpl(context, outcome);
|
||||
|
||||
|
@@ -112,7 +112,7 @@ public class CreateTopicDialog extends CreateSpaceDialog
|
||||
// set the mimetype and encoding
|
||||
writer.setMimetype(Repository.getMimeTypeForFileName(context, fileName));
|
||||
writer.setEncoding("UTF-8");
|
||||
writer.putContent(Utils.replaceLineBreaks(this.message));
|
||||
writer.putContent(Utils.replaceLineBreaks(this.message, false));
|
||||
|
||||
return outcome;
|
||||
}
|
||||
|
@@ -73,8 +73,8 @@ public class EditPostDialog extends CreatePostDialog
|
||||
@Override
|
||||
protected String finishImpl(FacesContext context, String outcome) throws Exception
|
||||
{
|
||||
// remove link breaks and replace with <br/>
|
||||
this.content = Utils.replaceLineBreaks(this.content);
|
||||
// remove link breaks and replace with <br>
|
||||
this.content = Utils.replaceLineBreaks(this.content, false);
|
||||
|
||||
// update the content
|
||||
NodeRef postNode = this.browseBean.getDocument().getNodeRef();
|
||||
|
Reference in New Issue
Block a user