in reply to Template Toolkit filtering all variables
So, in my mind, I simply keep track of "possibly user data" apart from "data I've constructed", and to the former, add "| html". You do realize that you need only those five characters, right?
The "h2" should not be escaped (it would print literally as <h2> which is very wrong), but the firstname and lastname need it, so I add "| html" to them.[% CGI.h2("Greetings!") %] Hello, [% firstname | html %] [% lastname | html %]!
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Template Toolkit filtering all variables
by holli (Abbot) on Oct 13, 2005 at 11:51 UTC | |
by merlyn (Sage) on Oct 13, 2005 at 11:54 UTC | |
|
Re^2: Template Toolkit filtering all variables
by marvell (Pilgrim) on Oct 13, 2005 at 11:58 UTC | |
by merlyn (Sage) on Oct 13, 2005 at 12:02 UTC | |
by marvell (Pilgrim) on Oct 13, 2005 at 12:08 UTC |