diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/attachment/AttachmentListDeletionConfirmationDialog.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/attachment/AttachmentListDeletionConfirmationDialog.java index f5a61324cf53163e122950396d32922ceb5529db..8196175b7d46618a80c490368b7bebe6fd820a9b 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/attachment/AttachmentListDeletionConfirmationDialog.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/attachment/AttachmentListDeletionConfirmationDialog.java @@ -26,6 +26,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.AbstractAs import ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict; import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.AbstractDataListPermanentDeletionConfirmationDialog; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.lang.StringEscapeUtils; import ch.systemsx.cisd.openbis.generic.shared.basic.IAttachmentHolder; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.AttachmentVersions; @@ -72,7 +73,8 @@ public final class AttachmentListDeletionConfirmationDialog List<String> fileNames = new ArrayList<String>(); for (TableModelRowWithObject<AttachmentVersions> attachmentVersion : attachmentVersions) { - fileNames.add(attachmentVersion.getObjectOrNull().getCurrent().getFileName()); + fileNames.add(StringEscapeUtils.unescapeHtml(attachmentVersion.getObjectOrNull() + .getCurrent().getFileName())); } return fileNames; } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/AttachmentDownloadServlet.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/AttachmentDownloadServlet.java index 2ee4caa605d98c0ac86b803128024424c8aac796..5a2a9ae38455411cc1b36b2b2736f0b00a00f2a3 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/AttachmentDownloadServlet.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/server/AttachmentDownloadServlet.java @@ -28,6 +28,7 @@ import org.springframework.web.servlet.mvc.AbstractCommandController; import ch.rinn.restrictions.Private; import ch.systemsx.cisd.openbis.generic.client.web.client.application.GenericConstants; +import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.lang.StringEscapeUtils; import ch.systemsx.cisd.openbis.generic.client.web.server.AbstractFileDownloadServlet; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.AttachmentHolderKind; @@ -77,7 +78,7 @@ public class AttachmentDownloadServlet extends AbstractFileDownloadServlet { encoding = "ISO-8859-1"; } - final String fileName = URLDecoder.decode(name, encoding); + final String fileName = StringEscapeUtils.unescapeHtml(URLDecoder.decode(name, encoding)); final String techIdString = request.getParameter(GenericConstants.TECH_ID_PARAMETER); final String attachmentHolderKind = request.getParameter(GenericConstants.ATTACHMENT_HOLDER_PARAMETER);