diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/blogs/blogpost.lib.ftl b/config/alfresco/templates/webscripts/org/alfresco/repository/blogs/blogpost.lib.ftl index ff712a76f7..c92a755112 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/repository/blogs/blogpost.lib.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/blogs/blogpost.lib.ftl @@ -15,18 +15,11 @@ <#macro addContent item> <#escape x as jsonUtils.encodeJSONString(x)> - <#if (contentLength?? && contentLength > -1)> - "content" : "${cropContent(item.node.properties.content, contentLength)}", + <#if (contentLength?? && contentLength > -1 && (item.node.content?length > contentLength))> + "content" : "${item.node.content?substring(0, contentLength)}", <#else> "content" : "${item.node.content}", -<#-- - <#if (contentLength?? && contentLength > -1)> - "content" : "${stringUtils.stripUnsafeHTML(cropContent(item.node.properties.content, contentLength))}", - <#else> - "content" : "${stringUtils.stripUnsafeHTML(item.node.content)}", - ---> diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/discussions/post.lib.ftl b/config/alfresco/templates/webscripts/org/alfresco/repository/discussions/post.lib.ftl index 26bd5b8f2b..4c415b6cc1 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/repository/discussions/post.lib.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/discussions/post.lib.ftl @@ -15,18 +15,11 @@ <#macro addContent post> <#escape x as jsonUtils.encodeJSONString(x)> - <#if (contentLength?? && contentLength > -1)> - "content" : "${cropContent(post.properties.content, contentLength)}", + <#if (contentLength?? && contentLength > -1 && (post.content?length > contentLength))> + "content" : "${post.content?substring(0, contentLength)}", <#else> "content" : "${post.content}", -<#-- - <#if (contentLength?? && contentLength > -1)> - "content" : "${stringUtils.stripUnsafeHTML(cropContent(post.properties.content, contentLength))}", - <#else> - "content" : "${stringUtils.stripUnsafeHTML(post.content)}", - --->