mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
- strip dangerous html for blog/discussions/comments
- fix for wrong-working all-filter in forum git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10520 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -16,9 +16,9 @@
|
||||
<#macro addContent item>
|
||||
<#escape x as jsonUtils.encodeJSONString(x)>
|
||||
<#if (contentLength?? && contentLength > -1 && (item.node.content?length > contentLength))>
|
||||
"content" : "${item.node.content?substring(0, contentLength)}",
|
||||
"content" : "${stringUtils.stripUnsafeHTML(item.node.content?substring(0, contentLength))}",
|
||||
<#else>
|
||||
"content" : "${item.node.content}",
|
||||
"content" : "${stringUtils.stripUnsafeHTML(item.node.content)}",
|
||||
</#if>
|
||||
</#escape>
|
||||
</#macro>
|
||||
|
@@ -72,7 +72,7 @@ function main()
|
||||
}
|
||||
|
||||
// selected tag
|
||||
var tag = args["tag"] != undefined && args["tag"].length > 0 ? args["tag"] : null;
|
||||
var tag = (args["tag"] != undefined && args["tag"].length > 0) ? args["tag"] : null;
|
||||
|
||||
// fetch and assign the data
|
||||
model.data = getBlogPostList(node, fromDate, toDate, tag, index, count);
|
||||
|
@@ -24,7 +24,7 @@
|
||||
"nodeRef" : "${item.node.nodeRef}",
|
||||
"name" : "${item.node.properties.name!''}",
|
||||
"title" : "${item.node.properties.title!''}",
|
||||
"content" : "${item.node.content}",
|
||||
"content" : "${stringUtils.stripUnsafeHTML(item.node.content)}",
|
||||
<#if item.author??>
|
||||
<@renderPerson person=item.author fieldName="author" />
|
||||
<#else>
|
||||
|
@@ -36,7 +36,7 @@ function main()
|
||||
var count = args["pageSize"] != undefined ? parseInt(args["pageSize"]) : 10;
|
||||
|
||||
// selected tag
|
||||
var tag = args["tag"] != undefined && args["tag"].length > 0 ? args["tag"] : null;
|
||||
var tag = (args["tag"] != undefined && args["tag"].length > 0) ? args["tag"] : null;
|
||||
|
||||
model.data = getTopicPostList(node, tag, index, count);
|
||||
|
||||
|
@@ -16,9 +16,9 @@
|
||||
<#macro addContent post>
|
||||
<#escape x as jsonUtils.encodeJSONString(x)>
|
||||
<#if (contentLength?? && contentLength > -1 && (post.content?length > contentLength))>
|
||||
"content" : "${post.content?substring(0, contentLength)}",
|
||||
"content" : "${stringUtils.stripUnsafeHTML(post.content?substring(0, contentLength))}",
|
||||
<#else>
|
||||
"content" : "${post.content}",
|
||||
"content" : "${stringUtils.stripUnsafeHTML(post.content)}",
|
||||
</#if>
|
||||
</#escape>
|
||||
</#macro>
|
||||
|
Reference in New Issue
Block a user