misc: don't generate substitution variables for non-html responses (#20294)

This commit is contained in:
Frédéric Péters 2017-11-27 11:18:58 +01:00
parent 7310e5481a
commit c4fc21a21a
1 changed files with 1 additions and 1 deletions

View File

@ -243,7 +243,7 @@ def get_decorate_vars(body, response, generate_breadcrumb=True):
body = str(body)
if get_request().get_header('x-popup') == 'true':
if get_request().get_header('x-popup') == 'true' or response.content_type != 'text/html':
return {'body': body}
kwargs = {}