From 7bcc57d6624696baaf314698b66c78ff3e5d11df Mon Sep 17 00:00:00 2001
From: ankitjavalkar
Date: Fri, 11 Jan 2019 15:13:48 +0530
Subject: Ensure that the Answers displayed in grade_user.html, user_data.html
and view_answerpaper escape special characters
---
yaksh/templates/yaksh/grade_user.html | 26 +++++++++++++-------------
yaksh/templates/yaksh/user_data.html | 26 +++++++++++++-------------
yaksh/templates/yaksh/view_answerpaper.html | 24 ++++++++++++------------
3 files changed, 38 insertions(+), 38 deletions(-)
(limited to 'yaksh')
diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html
index 2a22bd9..a76f2c7 100644
--- a/yaksh/templates/yaksh/grade_user.html
+++ b/yaksh/templates/yaksh/grade_user.html
@@ -164,27 +164,27 @@ Status : Failed
{% for testcase in question.get_test_cases %}
{% if testcase.correct %}
- {{ forloop.counter }}. {{ testcase.options|safe }}
+ {{ forloop.counter }}. {{ testcase.options }}
Correct
{% else %}
- {{ forloop.counter }}. {{ testcase.options|safe }}
+ {{ forloop.counter }}. {{ testcase.options }}
{% endif %}
{% endfor %}
{% elif question.type == "integer" or question.type == "string" or question.type == "float" %}
{{error|safe}}
+ {{error}}
{% endif %}
{% endfor %}
{% endwith %}
@@ -311,13 +311,13 @@ Status : Failed {{ ans.answer.answer.strip|safe }}
+ {{ ans.answer.answer.strip }}
{% elif question.type == "mcc"%}
{{error|safe}}
+ {{error}}
{% endif %}
{% endfor %}
{% endwith %}
@@ -231,10 +231,10 @@ User IP address: {{ paper.user_ip }}
{% if question.type != "code" %}
{{ answer.answer.answer.strip|safe }}
+ {{ answer.answer.answer.strip }}
{% endif %}
diff --git a/yaksh/templates/yaksh/view_answerpaper.html b/yaksh/templates/yaksh/view_answerpaper.html
index 2246db1..b87c818 100644
--- a/yaksh/templates/yaksh/view_answerpaper.html
+++ b/yaksh/templates/yaksh/view_answerpaper.html
@@ -54,32 +54,32 @@
{{error|safe}}
+ {{error}}
{% endif %}
{% endfor %}
{% endwith %}
--
cgit