Skip to content
Snippets Groups Projects
Commit 88a38406 authored by Jan Maximilian Michal's avatar Jan Maximilian Michal
Browse files

Fixes and closes #13 (newline escaping).

parent 35ea3e74
No related branches found
No related tags found
No related merge requests found
......@@ -119,7 +119,6 @@
{% include "core/message_box.html" %}
</div>
</div>
</div>
</div>
......@@ -159,7 +158,7 @@
// we need this one for the student readonly
var editor_student = ace.edit("student_text");
editor_student.setValue(`{{feedback.of_submission.text|safe}}`, -1);
editor_student.setValue(`{{feedback.of_submission.text|safe|escapejs}}`, -1);
editor_student.getSession().setMode("ace/mode/c_cpp");
editor_student.setOptions({
readOnly: true,
......@@ -170,7 +169,7 @@
var editor_tutor = ace.edit("tutor_text");
var textarea = $('textarea[id="id_text"]');
editor_tutor.focus();
editor_tutor.setValue(`{{feedback.text|safe}}`, -1);
editor_tutor.setValue(`{{feedback.text|safe|escapejs}}`, -1);
editor_tutor.getSession().setUseWrapMode(true)
editor_tutor.getSession().on("change", function () {
textarea.val(editor_tutor.getSession().getValue());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment