Jonathan Revusky wrote:
[snip]
Daniel,
You're right. The initial proposal only affects rendered text. Perhaps it
would make sence to widen up the proposal to support use cases like the #escape
thing.
Peter,
Filters and the escaping of variable output are two completely separate things. For example, FreeMarker has had filters (a.k.a. transforms) for
Jonathan,
yes you're right. Of course filters are a different thing. By saying "perhaps the proposal should be widened up" I meant that a mechanism to alter the rendered output (like the #escape thing should do) should be added too. Not as a filter but as a separate thing called --- (insert any name here). I apologize for the caused confusion.
[snip]
I am not really sure how to implement this, though. The first
idea that
comes into my mind w/o looking at the source is to have some kind of event that
is thrown whenever something is added to the output.
You shouldn't have to figure out if something needs to be escaped every time you output. It should be figured out once as part of the parse/compile step.
Good point here.
Otherwise I would not know
how to "monitor" the VTL. Is there already something in the core that let's you
implement something like the #escape-thing?
IIRC, supporting this in FreeMarker required a significant refactoring of our codebase. There was a very very big code cleanup/redesign/refactoring that occurred in the 2.0 and 2.1 cycles
I'd still like to see something like that happen with the velocity-codebase. But that'll be a long way I guess...
I will look a bit closer into the source while I am thinking about all this.
Which source? The Velocity source or the FreeMarker source? ;-)
;)
Peter
Cheers,
Jonathan Revusky -- lead developer, FreeMarker project, http://freemarker.org/ FreeMarker-Velocity comparison page, http://freemarker.org/fmVsVel.html FreeMarker 2.3pre5 is out!
Regards, Peter
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Peter Romianowski
coreg Weidenweg 60 10247 Berlin
Telefon: 030 / 41 72 42 31 Fax: 030 / 41 72 42 39
Email: mailto:[EMAIL PROTECTED] Website: http://www.coreg.de
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
