Skip to content

Apache Lucene open-source search software

SOLR-1008: Fix stats.jsp stat item entry name escaping

Erik Hatcher8347bf242bf8
diff --git a/CHANGES.txt b/CHANGES.txt
index 5dc4d1f45e7..6a8445cff47 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -239,6 +239,8 @@ Bug Fixes
27. SOLR-991: Better error message when parsing solrconfig.xml fails due to malformed XML. Error message notes the name
of the file being parsed. (Michael Henson via shalin)
+28. SOLR-1008: Fix stats.jsp XML encoding for <stat> item entries with ampersands in their names. (ehatcher)
+
Other Changes
----------------------
diff --git a/src/webapp/web/admin/stats.jsp b/src/webapp/web/admin/stats.jsp
index 9ce23281691..ca38c88e9b3 100644
--- a/src/webapp/web/admin/stats.jsp
+++ b/src/webapp/web/admin/stats.jsp
@@ -70,7 +70,7 @@ for (SolrInfoMBean.Category cat : SolrInfoMBean.Category.values()) {
<%
for (int i = 0; i < nl.size() ; i++) {
%>
- <stat name="<%= nl.getName(i) %>" >
+ <stat name="<%XML.escapeCharData(nl.getName(i), out); %>" >
<%= nl.getVal(i).toString() %>
</stat>
<%