diff --git a/config/alfresco/messages/webclient.properties b/config/alfresco/messages/webclient.properties index 291e85fd64..4eac7759aa 100644 --- a/config/alfresco/messages/webclient.properties +++ b/config/alfresco/messages/webclient.properties @@ -208,6 +208,7 @@ moved=moved copied=copied clipboard=Clipboard node_added_clipboard=An item was added to the clipboard. There are now {0} item(s) in the clipboard. To paste all collected items navigate to the desired space then from the menu under ''More Actions'' select ''Paste All''. +node_added_clipboard_avm=An item was added to the clipboard. There are now {0} item(s) in the clipboard. You can access them on the sidebar by selecting the ''Shelf'' plugin using the top left menu. not_suitable_view_for_paste_warn=Cannot paste \"{0}\" to the current view. Please navigate to a valid destination. recent_spaces=Recent Spaces shortcuts=Shortcuts diff --git a/source/java/org/alfresco/web/bean/clipboard/ClipboardBean.java b/source/java/org/alfresco/web/bean/clipboard/ClipboardBean.java index 4600e92451..97273fc169 100644 --- a/source/java/org/alfresco/web/bean/clipboard/ClipboardBean.java +++ b/source/java/org/alfresco/web/bean/clipboard/ClipboardBean.java @@ -352,7 +352,7 @@ public class ClipboardBean implements Serializable FacesContext context = FacesContext.getCurrentInstance(); if (Application.getClientConfig(context).isClipboardStatusVisible()) { - String pattern = Application.getMessage(context, "node_added_clipboard"); + String pattern = Application.getMessage(context, StoreRef.PROTOCOL_AVM.equals(ref.getStoreRef().getProtocol()) ? "node_added_clipboard_avm" : "node_added_clipboard"); String msg = MessageFormat.format(pattern, items.size()); FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_INFO, msg, msg); context.addMessage(null, facesMsg); diff --git a/source/java/org/alfresco/web/forms/XSLTRenderingEngine.java b/source/java/org/alfresco/web/forms/XSLTRenderingEngine.java index 6def3ce236..35a686cf49 100644 --- a/source/java/org/alfresco/web/forms/XSLTRenderingEngine.java +++ b/source/java/org/alfresco/web/forms/XSLTRenderingEngine.java @@ -20,7 +20,6 @@ package org.alfresco.web.forms; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import java.io.StringWriter; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; @@ -43,6 +42,7 @@ import javax.xml.transform.stream.StreamResult; import org.alfresco.service.namespace.QName; import org.apache.bsf.BSFManager; import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.exception.ExceptionUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.xml.dtm.ref.DTMNodeProxy; @@ -448,7 +448,7 @@ public class XSLTRenderingEngine try { - final Document d = XMLUtil.parse(in); + final Document d = XMLUtil.secureParseXSL(in); if (LOGGER.isDebugEnabled()) LOGGER.debug("loaded " + XMLUtil.toString(d)); return new DOMSource(d); @@ -481,7 +481,12 @@ public class XSLTRenderingEngine final StringBuilder msg = new StringBuilder("errors encountered creating tranformer ... \n"); for (TransformerException te : errors) { - msg.append(te.getMessageAndLocation()).append("\n"); + msg.append(te.getMessageAndLocation()).append("\n"); + String cause = ExceptionUtils.getRootCauseMessage(te); + if (cause != null) + { + msg.append(" caused by: " + cause); + } } throw new RenderingEngine.RenderingException(msg.toString()); } @@ -516,7 +521,12 @@ public class XSLTRenderingEngine final StringBuilder msg = new StringBuilder("errors encountered during transformation ... \n"); for (TransformerException te : errors) { - msg.append(te.getMessageAndLocation()).append("\n"); + msg.append(te.getMessageAndLocation()).append("\n"); + String cause = ExceptionUtils.getRootCauseMessage(te); + if (cause != null) + { + msg.append(" caused by: " + cause); + } } throw new RenderingEngine.RenderingException(msg.toString()); }