Fix ALF-3585: AtomPub summary can render first part of binary content resulting in invalid XML

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@20705 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
David Caruana
2010-06-18 12:08:05 +00:00
parent 63e1a9e851
commit 2ff0d3bade

View File

@@ -787,8 +787,8 @@
[#-- --]
[#-- Helper to render Atom Summary --]
[#macro contentsummary node][#if node.properties.description??]${node.properties.description?xml}[#elseif node.properties.title??]${node.properties.title?xml}[#elseif node.mimetype?? && node.mimetype == "text/plain"]${cropContent(node.properties.content, 50)?xml}[#else]${node.properties.name?xml}[/#if][/#macro]
[#macro foldersummary node][#if node.properties.description??]${node.properties.description?xml}[#elseif node.properties.title??]${node.properties.title?xml}[#else][/#if][/#macro]
[#macro contentsummary node][#if node.properties.description??]${node.properties.description?xml}[#elseif node.properties.title??]${node.properties.title?xml}[#elseif node.properties.name??]${node.properties.name?xml}[#else][/#if][/#macro]
[#macro foldersummary node][#if node.properties.description??]${node.properties.description?xml}[#elseif node.properties.title??]${node.properties.title?xml}[#elseif node.properties.name??]${node.properties.name?xml}[#else][/#if][/#macro]
[#-- Helper to render Alfresco content type to Atom content type --]
[#macro contenttype type][#if type == "text/html"]text[#elseif type == "text/xhtml"]xhtml[#elseif type == "text/plain"]text[#else]${type}[/#if][/#macro]