I’m using Pylons with Mako templates and I want to avoid typing this all the time:
${ h.some_function_that_outputs_html() | n }
I want to somehow mark the function, or a variable as safe (you can do that in Django) so I don’t have to pipe-en all the time. Any ideas?
I just found out that if you put a html method in your class, then Mako will just call that method and output whatever it returns in the template.
So I did:
That’s basically what h.literal does.