better escaping in ace view of pythoncode question type

This commit is contained in:
adam j hartz 2025-09-29 13:46:04 -04:00
commit 6243eb0596
Signed by: hz
GPG key ID: B63A0A59F5C82493

View file

@ -642,7 +642,7 @@ def render_html_ace(last_log, **info):
params = {
"name": name,
"init": init,
"safeinit": init.replace("<", "&lt;"),
"safeinit": html.escape(init),
"height": info["csq_rows"] * (fontsize + 4),
"fontsize": fontsize,
}