XD-DENG 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_r265429947
##########
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:
nit: why not `return '\n'.join(output)`? (if you want a prefixing `\n`, then
`return '\n'.join([''] + output)` or `return '\n' + '\n'.join(output)`) I don't
see difference. In such way we don't need to import `functools` here.
----------------------------------------------------------------
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