----- Original Message -----
From: "Jonathan Revusky" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 25, 2003 6:47 PM
Subject: Re: Proposal: Filters


>
> They're completely different things because a filter or transform is
> applied at render-time and the variable-escaping stuff is applied at
> parse time. You figure out which variables are HTML-escaped or whatever
> when you compile the template and then there is no cost at render-time
> -- or hardly any.
>

There is no runtime cost. I mean, no overhead above the HTML escaping
itself. All arbitration is done at template parse time.

>
> IIRC, supporting this in FreeMarker required a significant refactoring
> of our codebase.

Well, to support escapes I had to introduce some methods for AST surgery,
most notably transforming an expression in form of AST tree through an
AST-transforming function. It is a significant internal feature, but I
wouldn't say it required significant refactoring of existing code.

If folks here are interested, I can give a technical overview of how I
implemented <#escape> in FreeMarker to give you some ideas.

Attila.



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

Reply via email to