the new keyword async is causing errors when we run this with python 3.8. https://docs.python.org/3/whatsnew/3.7.html I tried in the first place, to change the definition of that value in the place where the context is defined, but it seems that it is taken from https://github.com/jazzband/django-pipeline, This solves many problems for lms and cms tests that were making the jenkins workers get timeout. That template have not seen changed since 2012, so I had to do additional changes in the templates in order to pass the xsslint checks: mako-missing-default mako-invalid-html-filter I am not sure about the remove of the safe filter. But I didn't found information about the 'safe' filter. It is probably that the now default 'h' filter is enough.
14 lines
338 B
HTML
14 lines
338 B
HTML
<%page expression_filter="h"/>
|
|
<%! from openedx.core.djangolib.js_utils import dump_js_escaped_json %>
|
|
<script \
|
|
% if context.get('async', default=None):
|
|
async \
|
|
% endif
|
|
% if defer:
|
|
defer \
|
|
% endif
|
|
type="text/javascript" charset="utf-8">
|
|
## xss-lint: disable=mako-invalid-html-filter
|
|
${source | n, dump_js_escaped_json}
|
|
</script>
|