fix escaping submission comments in speedgrader, refs #3888

Change-Id: I5866a1029bee2f44d3a7caf5700944b729a6a417
Reviewed-on: https://gerrit.instructure.com/2411
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
This commit is contained in:
Zach Wily 2011-02-23 14:00:47 -07:00
parent 0858d4e337
commit 98bf5f0674
1 changed files with 1 additions and 1 deletions

View File

@ -1024,7 +1024,7 @@ var jsonData, visibleRubricAssessments;
// if(comment.anonymous) { comment.author_name = "Anonymous"; }
var $comment = $comment_blank.clone(true).fillTemplateData({ data: comment });
$comment.find('span.comment').html(comment.comment.replace(/\n/g, "<br />"));
$comment.find('span.comment').html($.htmlEscape(comment.comment).replace(/\n/g, "<br />"));
// this is really poorly decoupled but over in speed_grader.html.erb these rubricAssessment. variables are set.
// what this is saying is: if I am able to grade this assignment (I am administrator in the course) or if I wrote this comment...
var commentIsDeleteableByMe = rubricAssessment.assessment_type === "grading" ||