I started using EscapeTool today (since it was far more comprehensive that my 
primitive and misnamed URLEncoder tool), and noticed that it only took 
String arguments.

So if I had did $esc.html($value) and value wasn't a String, I got 
'$esc.html($value)' returned as a literal.

In general, should Velocity tools that operate on a String operate on an 
Object instead and perform a object.toString() conversion first?  Or at 
least provide Object argument wrapper methods to call the String argument 
methods?

Obviously, I can easily subclass EscapeTool even if no one else agrees with 
me and add "public String html(Object object)"-like methods, but I'm curious 
what we consider to be best-practices....

-Mike


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to