Note that the VelocityResponseWriter puts a tool in the context to escape 
various things.  See the "Velocity Context" section here: 
<http://wiki.apache.org/solr/VelocityResponseWriter>.  That'll take you to this 
<http://velocity.apache.org/tools/releases/1.4/generic/EscapeTool.html>

You can do $esc.url($some_variable) to URL encode _pieces_ of a URL.   You can 
see the use of $esc in VM_global_library.vm and some of the other templates 
that ship with Solr.  

        Erik


On Mar 27, 2012, at 10:00 , Marcelo Carvalho Fernandes wrote:

> I've had the same problem and my solution was to...
> 
> #set($pName = "#field('name')")
> #set($pName = $pName.trim())
> 
> ----
> Marcelo Carvalho Fernandes
> +55 21 8272-7970
> +55 21 2205-2786
> 
> 
> On Mon, Mar 26, 2012 at 3:24 PM, henri.gour...@laposte.net <
> henri.gour...@laposte.net> wrote:
> 
>> trying to play with javascript to clean-up my URL!!
>> Context is velocity
>> 
>> 
>> 
>> Suggestions?
>> Thanks
>> 
>> --
>> View this message in context:
>> http://lucene.472066.n3.nabble.com/First-steps-with-Solr-tp3858406p3858959.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>> 

Reply via email to