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:
Erik Hatcher 2008-11-13 02:03:48 +00:00
parent f9fbb703cc
commit 57c70675d3
1 changed files with 2 additions and 0 deletions

View File

@ -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);
}