misc: don't generate substitution variables for non-html responses (#20294)
This commit is contained in:
parent
7310e5481a
commit
c4fc21a21a
|
@ -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 = {}
|
||||
|
|
Loading…
Reference in New Issue