On Tue, Jan 13, 2009 at 1:26 PM, mk <[email protected]> wrote:
>
> Ben Bangert wrote:
>>> But output of my own helper is still being escaped.
>>
>> Can you include the helper you're referring to? Your helper might be
>> using a function/class which causes it to escape content.
>
> It's really basic:
>
> def format_env(env):
>     items = env.items()
>     items.sort()
>     vl = [ "%s: %r" % (el[0], el[1]) for el in items ]
>     return "<br>\n".join(vl)
>
>
> I use it in a template like this:
>
> ${h.format_env(request.environ)}
>
> Regards,
> mk

take a look at webhelpers.html, you could make that helper better with
it and skip the literal thing. (it does that internally)

also I totally agree with Ben. auto escaping will confuse the newbies
and they will learn about cross-site scripting. that is great!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to