ui: use jsesc to pass args

This commit is contained in:
undefined committed 2021-07-21 19:29:10 +08:00
1 parent 97efa45647
commit e86cd07c37
4 files changed
+9 -7

No files matched your search

@@ -41,8 +41,8 @@
{% block body %}{% endblock %}
{% if not isIE(handler.request.headers['user-agent']) %}
<script>
var UiContext = "{{ UiContext|json|base64_encode }}";
var UserContext = "{{ UserContext|json|base64_encode }}";
var UiContext = '{{ UiContext|json|jsesc|safe }}';
var UserContext = '{{ UserContext|json|jsesc|safe }}';
</script>
<script type="text/javascript" src="{{ ('/locale/{0}.js'.format(handler.translate('__id'))) }}"></script>
<script type="text/javascript" src="/ui-constants.js"></script>