Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/
package edu.harvard.iq.dataverse;

import edu.harvard.iq.dataverse.AbstractGlobalIdServiceBean.GlobalIdMetadataTemplate;
import edu.harvard.iq.dataverse.branding.BrandingUtil;

import java.io.ByteArrayOutputStream;
Expand All @@ -21,7 +20,6 @@
import java.util.logging.Logger;
import javax.ejb.EJB;
import javax.ejb.Stateless;
import javax.inject.Inject;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.TypedQuery;
Expand Down Expand Up @@ -176,7 +174,8 @@ public static String getMetadataFromDvObject(String identifier, Map<String, Stri
metadataTemplate.setCreators(Util.getListFromStr(metadata.get("datacite.creator")));
metadataTemplate.setAuthors(dataset.getLatestVersion().getDatasetAuthors());
if (dvObject.isInstanceofDataset()) {
String description = dataset.getLatestVersion().getDescriptionPlainText();
//While getDescriptionPlainText strips < and > from HTML, it leaves '&' (at least so we need to xml escape as well
String description = StringEscapeUtils.escapeXml(dataset.getLatestVersion().getDescriptionPlainText());
if (description.isEmpty() || description.equals(DatasetField.NA_VALUE)) {
description = AbstractGlobalIdServiceBean.UNAVAILABLE;
}
Expand Down