Make sure slashes in JSON content don't end script tags. PLAT-462
The string "</script>" in JSON data would end the script element we're embedding the data in. To make sure the data doesn't disrupt the script, we escape the slash as \/ .
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<div class="${' '.join(classes) | n}" ${data_attributes}>
|
||||
% if js_pass_parameters:
|
||||
% if js_init_parameters:
|
||||
<script type="json/xblock-args" class="xblock_json_init_args">
|
||||
${js_init_parameters}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user