Skip to content

Commit

Permalink
Use pfromat instead of str to render arguments in WebUI (apache#9587)
Browse files Browse the repository at this point in the history
  • Loading branch information
turbaszek authored Jun 30, 2020
1 parent 4de5089 commit 7f70f6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions airflow/www/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
from flask_appbuilder.actions import action
from flask_appbuilder.models.sqla.filters import BaseFilter
from flask_babel import lazy_gettext
from jinja2.utils import htmlsafe_json_dumps # type: ignore
from jinja2.utils import htmlsafe_json_dumps, pformat # type: ignore
from pygments import highlight, lexers
from pygments.formatters import HtmlFormatter
from sqlalchemy import and_, desc, func, or_, union_all
Expand Down Expand Up @@ -631,7 +631,7 @@ def rendered(self):
if template_field in wwwutils.get_attr_renderer():
html_dict[template_field] = wwwutils.get_attr_renderer()[template_field](content)
else:
html_dict[template_field] = Markup("<pre><code>{}</pre></code>").format(str(content))
html_dict[template_field] = Markup("<pre><code>{}</pre></code>").format(pformat(content))

return self.render_template(
'airflow/ti_code.html',
Expand Down

0 comments on commit 7f70f6f

Please sign in to comment.