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:
Ned Batchelder
2015-03-14 17:32:13 -04:00
parent c8825652b1
commit 6928035cd1
3 changed files with 52 additions and 4 deletions

View File

@@ -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>