Solved! I think.
I use Pyramid-framework version 1.4 with mako templating and it seems that deep inside mako_templating.py
resides a line:
default_filters = sget('default_filters', 'h')
Which explains why the html filtering is always used as a default. Doesn't really explain why it overrides the page expression_filters, but seems close enough to answer my own question.
As of 1.5.something Pyramid has moved mako renderers to a differed package called pyramid_mako
and it seems the same default settings are there too.
To override this one must set the mako.default_filters
setting in the Pyramids .ini
-file. This however screwed up all my exisiting templates, so I think I'll have to stick with using the | n
flag with expressions within the templates.
This took some time to figure out. Hope this will help somebody else.
EDIT: Set mako.default_filters = unicode
removes the need to use n-flag. Only using mako.default_filters = n
messed things up.