TemplateParser: save the output context/escape mode in the representation