lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hoss...@apache.org
Subject svn commit: r481121 - /incubator/solr/trunk/src/webapp/resources/admin/_info.jsp
Date Fri, 01 Dec 2006 00:52:37 GMT
Author: hossman
Date: Thu Nov 30 16:52:35 2006
New Revision: 481121

URL: http://svn.apache.org/viewvc?view=rev&rev=481121
Log:
escape defaultQuery so it's safe to display in HTML forms

Modified:
    incubator/solr/trunk/src/webapp/resources/admin/_info.jsp

Modified: incubator/solr/trunk/src/webapp/resources/admin/_info.jsp
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/src/webapp/resources/admin/_info.jsp?view=diff&rev=481121&r1=481120&r2=481121
==============================================================================
--- incubator/solr/trunk/src/webapp/resources/admin/_info.jsp (original)
+++ incubator/solr/trunk/src/webapp/resources/admin/_info.jsp Thu Nov 30 16:52:35 2006
@@ -19,7 +19,9 @@
                  org.apache.solr.schema.IndexSchema,
                  java.io.File"%>
 <%@ page import="java.net.InetAddress"%>
+<%@ page import="java.io.StringWriter"%>
 <%@ page import="org.apache.solr.core.Config"%>
+<%@ page import="org.apache.solr.util.XML"%>
 
 <%
   SolrCore core = SolrCore.getSolrCore();
@@ -40,7 +42,10 @@
   InetAddress addr = InetAddress.getLocalHost();
   String hostname = addr.getCanonicalHostName();
 
-  String defaultSearch = SolrConfig.config.get("admin/defaultQuery/text()",null);
+  StringWriter tmp = new StringWriter();
+  XML.escapeCharData(SolrConfig.config.get("admin/defaultQuery/text()", null),
+                     tmp);
+  String defaultSearch = tmp.toString();
   String cwd=System.getProperty("user.dir");
   String solrHome= Config.getInstanceDir();
 %>



Mime
View raw message