mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-14 13:33:08 +00:00
Fix for SF bug [1896225] HTML tags not stripped in statistics display
git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3341 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -429,7 +429,7 @@ public class HTMLReport implements Report
|
||||
frag.append("<a href=\"" + stats[i].getReference() + "\" ");
|
||||
frag.append("target=\"_blank\">");
|
||||
}
|
||||
frag.append(stats[i].getKey());
|
||||
frag.append(this.clean(stats[i].getKey()));
|
||||
if (stats[i].getReference() != null)
|
||||
{
|
||||
frag.append("</a>");
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user