templates: Decode query.context from utf8