string templated fields are not rendered literally #14543
Labels
affected_version:2.0
Issues Reported for 2.0
area:UI
Related to UI/UX. For Frontend Developers.
good first issue
kind:bug
This is a clearly a bug
Milestone
Apache Airflow version: 2.0.1
Kubernetes version (if you are using kubernetes) (use
kubectl version
): n/aEnvironment:
uname -a
): 3.10.0-1160.11.1.el7.x86_64What happened:
Given the following code
The
command
field is rendered as:What you expected to happen:
I expect to see
How to reproduce it:
Anything else we need to know:
This is because the following line renders templated fields using the
pformat
function.airflow/airflow/www/views.py
Lines 926 to 928 in 35c9a90
I suggest we should render strings as is.
if renderer in renderers: html_dict[template_field] = renderers[renderer](content) else: html_dict[template_field] = Markup("<pre><code>{}</pre></code>").format( pformat(content) + content if isinstance(content, str) else pformat(content) ) # noqa
The text was updated successfully, but these errors were encountered: