Fix lms templates to prevent xss attacks.
This patch is part of multiple PR's. LEARNER-4632
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
<%page expression_filter="h"/>
|
||||
<%inherit file="/main.html" />
|
||||
<%!
|
||||
from django.urls import reverse
|
||||
@@ -21,9 +22,9 @@
|
||||
duration: 200
|
||||
});
|
||||
if (self.html() === "[ + ]") {
|
||||
self.html("[ − ]");
|
||||
self.html(edx.HtmlUtils.HTML("[ − ]").toString());
|
||||
} else {
|
||||
self.html("[ + ]");
|
||||
self.text("[ + ]");
|
||||
}
|
||||
e.preventDefault();
|
||||
});
|
||||
@@ -130,7 +131,7 @@ textarea {
|
||||
|
||||
%if course_id is not None:
|
||||
## Translators: Git is a version-control system; see http://git-scm.com/about
|
||||
<h2>${_('Recent git load activity for {course_id}').format(course_id=course_id) | h}</h2>
|
||||
<h2>${_('Recent git load activity for {course_id}').format(course_id=course_id)}</h2>
|
||||
%if error_msg:
|
||||
<h3>${_('Error')}:</h3>
|
||||
<p>${error_msg}</p>
|
||||
@@ -160,7 +161,7 @@ textarea {
|
||||
<td>${date}</td>
|
||||
<td>
|
||||
<a href="${reverse('gitlogs_detail', kwargs={'course_id': unicode(cil.course_id)})}">
|
||||
${cil.course_id | h}
|
||||
${cil.course_id}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
@@ -176,7 +177,7 @@ textarea {
|
||||
<tr class="import-log" id="import-log-${index}">
|
||||
<td colspan="3">
|
||||
<pre>
|
||||
${cil.import_log | h}
|
||||
${cil.import_log}
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user