Escaped values before passed to mako.

Because he MarkupSafe 0.17 is not py3.2 compatible.
Merge pull request #123 from brodul/escape_template_values_bug_117

Escaped values before passed to mako.