summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrabhu Ramachandran2011-12-04 21:58:37 +0530
committerPrabhu Ramachandran2011-12-04 21:58:37 +0530
commit7104f495d01fb934af11c8dfd09da087174c1b12 (patch)
treedbe7be9f2f499e0bb786c7a9f0847ea88a3a4882
parent6755a1604094e601fc6df88929841b5a06690c90 (diff)
downloadonline_test-7104f495d01fb934af11c8dfd09da087174c1b12.tar.gz
online_test-7104f495d01fb934af11c8dfd09da087174c1b12.tar.bz2
online_test-7104f495d01fb934af11c8dfd09da087174c1b12.zip
The answer needs to be HTML escaped.
-rw-r--r--templates/exam/grade_user.html6
-rw-r--r--templates/exam/user_data.html6
2 files changed, 6 insertions, 6 deletions
diff --git a/templates/exam/grade_user.html b/templates/exam/grade_user.html
index 2a109af..75ed2e0 100644
--- a/templates/exam/grade_user.html
+++ b/templates/exam/grade_user.html
@@ -43,12 +43,12 @@ Start time: {{ paper.start_time }} <br/>
<p> Choices:
{% for option in question.options.strip.splitlines %} {{option}}, {% endfor %}
</p>
-<p>Student answer: {{ answers.0|safe }}</p>
+<p>Student answer: {{ answers.0 }}</p>
{% else %}{# non-mcq questions #}
<pre>
{% for answer in answers %}################################################################################
-{{ answer.answer.strip|safe }}
-# Autocheck: {{ answer.error|safe }}
+{{ answer.answer.strip }}
+# Autocheck: {{ answer.error }}
{% endfor %}</pre>
{% endif %} {# if question.type #}
{% with answers|last as answer %}
diff --git a/templates/exam/user_data.html b/templates/exam/user_data.html
index 77de5ce..9fb442a 100644
--- a/templates/exam/user_data.html
+++ b/templates/exam/user_data.html
@@ -45,12 +45,12 @@ User IP address: {{ paper.user_ip }}
<p> Choices:
{% for option in question.options.strip.splitlines %} {{option}}, {% endfor %}
</p>
-<p>Student answer: {{ answers.0|safe }}</p>
+<p>Student answer: {{ answers.0 }}</p>
{% else %}{# non-mcq questions #}
<pre>
{% for answer in answers %}################################################################################
-{{ answer.answer.strip|safe }}
-# Autocheck: {{ answer.error|safe }}
+{{ answer.answer.strip }}
+# Autocheck: {{ answer.error }}
{% endfor %}</pre>
{% endif %}
{% with answers|last as answer %}