The templating engine is escaping the variable, because just about every templating engine does that.
You need to structure your templates to not escape variables. This differs in mako , chameleon, etc.
IIRC, the starter
scaffold uses Chameleon's .pt
templates.
If that's what your'e using, this other StackOverflow question answers your question fully: Python Pyramid & Chameleon templating language escapes html