Skip to content

Commit

Permalink
Merge pull request #1027 from drgrice1/bugfix/protect-error-html-try-2
Browse files Browse the repository at this point in the history
Another attempt at fixing `student_ans` HTML escaping issues.
  • Loading branch information
Alex-Jordan authored Mar 27, 2024
2 parents df9c40d + 74a0365 commit e1dcbbb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Value/AnswerChecker.pm
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ sub cmp_parse {
$self->cmp_diagnostics($ans);
}
} else {
$ans->{student_ans} = protectHTML($ans->{student_ans});
$self->cmp_collect($ans);
$self->cmp_error($ans);
}
Expand Down Expand Up @@ -337,8 +338,6 @@ sub cmp_error {
. protectHTML(substr($string, $s, $e - $s))
. '</SPAN>'
. protectHTML(substr($string, $e));
} else {
$ans->{student_ans} = protectHTML($ans->{student_ans});
}
$self->cmp_Error($ans, $message);
}
Expand Down

0 comments on commit e1dcbbb

Please sign in to comment.