E.g. in XML the text between tags can't use these entities; attribute values must use a subset consisting of IIRC 2? 3? particular entities (those that might cause confusion, e.g. quotes and ampersands).
If you want the "full monty" Java's standard libraries offer the afore-mentioned URL encoding (which uses EVERYTHING IIRC?).
Otherwise, each subset needs to be handled on a case by case basis; it's very very easy to code so I don't see it's a problem? Typically I create an encode Collection in the static{} section of my relevant class files, and use it in reverse mapping to decode. Takes about 10 lines of code for everything, plus one per entity you wish to handle.
YMMV.
PS Is anyone still interested in integrating VTL with NIO? There was some (brief) discussion when I proposed it a while back, but no definite interest or conclusions AFAICS ?...
Mike Kienenberger wrote:
Terry Steichen <[EMAIL PROTECTED]> wrote:
I think Mike is looking for something like this (don't recall where I got
it
from, but you're welcome to it if it works for you):
Yeah, unescapeCodes() would be the converse corollary of what I'm referring to.
I think it makes sense to have html-escaping as a standard web VelocityTool.
I've started writing one from scratch. However, I don't know when I'll get around to finishing it (I've only typed in the 4 major escape codes [&, <, >
, and "] so far) or when I'll get it documented sufficiently to submit.
-Mike
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]