diff --git a/lms/templates/instructor/instructor_dashboard_2/metrics.html b/lms/templates/instructor/instructor_dashboard_2/metrics.html
index 7aae9338ae..5eee8e05e1 100644
--- a/lms/templates/instructor/instructor_dashboard_2/metrics.html
+++ b/lms/templates/instructor/instructor_dashboard_2/metrics.html
@@ -91,7 +91,7 @@ from django.template.defaultfilters import escapejs
$('.metrics-overlay-content thead', metrics_overlay).append(overlay_content);
$.each(response.results, function(index, value ){
- overlay_content = '
| ' + value['name'] + " | " + value['username'] + ' |
';
+ overlay_content = '| ' + _.escape(value['name']) + " | " + _.escape(value['username']) + ' |
';
$('.metrics-overlay-content tbody', metrics_overlay).append(overlay_content);
});
// If student list too long, append message to screen.
@@ -131,7 +131,7 @@ from django.template.defaultfilters import escapejs
$('.metrics-overlay-content thead', metrics_overlay).append(overlay_content);
$.each(response.results, function(index, value ){
- overlay_content = '| ' + value['name'] + " | " + value['username'] + " | " + value['grade'] + " | " + value['percent'] + ' |
';
+ overlay_content = '| ' + _.escape(value['name']) + " | " + _.escape(value['username']) + " | " + _.escape(value['grade']) + " | " + _.escape(value['percent']) + ' |
';
$('.metrics-overlay-content tbody', metrics_overlay).append(overlay_content);
});
// If student list too long, append message to screen.