diff --git a/dspace-api/src/main/java/org/dspace/app/statistics/HTMLReport.java b/dspace-api/src/main/java/org/dspace/app/statistics/HTMLReport.java index 08c9d930d0..6ed96cb76e 100644 --- a/dspace-api/src/main/java/org/dspace/app/statistics/HTMLReport.java +++ b/dspace-api/src/main/java/org/dspace/app/statistics/HTMLReport.java @@ -429,7 +429,7 @@ public class HTMLReport implements Report frag.append(""); } - frag.append(stats[i].getKey()); + frag.append(this.clean(stats[i].getKey())); if (stats[i].getReference() != null) { frag.append(""); @@ -506,5 +506,19 @@ public class HTMLReport implements Report { return ""; } + + /** + * Clean Stirngs for display in HTML + * + * @param s The String to clean + * @return The cleaned String + */ + private String clean(String s) + { + // Clean up the statistics keys + s = s.replace("<", "<"); + s = s.replaceAll(">", ">"); + return s; + } } diff --git a/dspace/CHANGES b/dspace/CHANGES index bcde4e95fd..dc11637868 100644 --- a/dspace/CHANGES +++ b/dspace/CHANGES @@ -3,6 +3,7 @@ - Enable ldap.login.specialgroup special group for all LDAP users - Fix for SF bug [2164955] DSpace1.5.1(XML) problem with Login to restricted bitstreams - Fix for SF bug [2343281] XHTML Head Dissimination Crosswalk exposes provenance info + - Fix for SF bug [1896225] HTML tags not stripped in statistics display (Stuart Lewis / Chris Yates / Flavio Botelho / Alex Barbieri / Reuben Pasquini) - [2057378] Hierarchical LDAP support