How to pass table as parameter in mako

71 views
Skip to first unread message

ning zhang

unread,
Nov 3, 2012, 2:18:18 PM11/3/12
to mako-d...@googlegroups.com
Hi all,

I am try to pass a parameter as ${table} in mako.

For example, I have the a simple html

<html>
<header></header
<body>
${table}
</body>
</html>

The table has been passed, however all the < become &lt.

I guess everything has been transferred to utf8. Is that anyway I could avoid this?

regards,
Ning


Benjamin Trofatter

unread,
Nov 3, 2012, 4:49:20 PM11/3/12
to mako-d...@googlegroups.com
Assuming that `table` is a variable representing an html string, you'll want to take a look at the "n" filter in the Mako docs.

Ben




--
You received this message because you are subscribed to the Google Groups "Mako Templates for Python" group.
To view this discussion on the web visit https://groups.google.com/d/msg/mako-discuss/-/w3XRV05hfZ0J.
To post to this group, send email to mako-d...@googlegroups.com.
To unsubscribe from this group, send email to mako-discuss...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mako-discuss?hl=en.

Reply all
Reply to author
Forward
0 new messages