Escaped values before passed to mako.

Because he MarkupSafe 0.17 is not py3.2 compatible. And the template engine breaks because repr() and str() are not called.

We need to think about how to test that kind of stuff to. Any suggestions?