mirror of https://github.com/apache/lucene.git
Add EscapeTool into context, allowing url, html, and other escaping capabilties
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@713614 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f9fbb703cc
commit
57c70675d3
|
@ -20,6 +20,7 @@ package org.apache.solr.request;
|
|||
import org.apache.solr.common.util.NamedList;
|
||||
import org.apache.velocity.Template;
|
||||
import org.apache.velocity.VelocityContext;
|
||||
import org.apache.velocity.tools.generic.EscapeTool;
|
||||
import org.apache.velocity.app.VelocityEngine;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -38,6 +39,7 @@ public class VelocityResponseWriter implements QueryResponseWriter {
|
|||
context.put("request", request);
|
||||
context.put("response", response);
|
||||
context.put("page",new PageTool(request,response));
|
||||
context.put("esc", new EscapeTool());
|
||||
template.merge(context, writer);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue