ashb commented on a change in pull request #4911: [AIRFLOW-3768] Escape search
parameter in pagination controls
URL: https://github.com/apache/airflow/pull/4911#discussion_r265490643
##########
File path: airflow/www/utils.py
##########
@@ -186,9 +186,9 @@ def is_current(current, page):
showPaused=showPaused)),
disabled=is_disabled))
- output.append('</ul>')
+ output.append(Markup('</ul>'))
- return wtforms.widgets.core.HTMLString('\n'.join(output))
+ return functools.reduce(lambda x, y: x + "\n" + y, output, '')
Review comment:
There might be a better way of doing this - but join returns a string, the
functools method returns a functools.Markup object so that we know when it is
interpolated in a template that this is safe html.
I could do `return Markup('\n'.join(output))` I guess
http://flask.pocoo.org/docs/1.0/api/#flask.Markup
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services