NodeList.render() and SafeString

17 views
Skip to first unread message

Michael Elsdörfer

unread,
Nov 29, 2007, 8:54:24 PM11/29/07
to django...@googlegroups.com
I just updated to an auto-escaping enabled trunk, and I'm trying to
adjust some template tags. One of them stores a nodelist and renders
it at some point.

Now, NodeList.render() returns escaped data, but does not mark it as
safe (it's a unicode instance). Is this just an oversight, or as
designed? If the latter, can anyone explain why?

Michael

Malcolm Tredinnick

unread,
Nov 29, 2007, 9:03:10 PM11/29/07
to django...@googlegroups.com

It's an oversight; I hadn't thought of that case. You're right, marking
render() output as safe should be the right thing to do. If you'd care
to open a ticket so this doesn't get lost, I'll fix it tomorrow or
during the sprint on the weekend.

Cheers,
Malcolm


Michael Elsdörfer

unread,
Nov 30, 2007, 5:07:32 AM11/30/07
to django...@googlegroups.com
> It's an oversight; I hadn't thought of that case. You're right, marking
> render() output as safe should be the right thing to do. If you'd care
> to open a ticket so this doesn't get lost, I'll fix it tomorrow or
> during the sprint on the weekend.

Thanks Malcolm:

http://code.djangoproject.com/ticket/6057

Michael

Reply all
Reply to author
Forward
0 new messages