diff --git a/templates/ContentGenerator/Instructor/ProblemGrader.html.ep b/templates/ContentGenerator/Instructor/ProblemGrader.html.ep
index 920182f8a7..a9d260bb33 100644
--- a/templates/ContentGenerator/Instructor/ProblemGrader.html.ep
+++ b/templates/ContentGenerator/Instructor/ProblemGrader.html.ep
@@ -175,16 +175,21 @@
: $scores[$i] ? 'color:#060' : 'color:#600' %>">
% if ($answerTypes[$i] && $answerTypes[$i] eq 'essay') {
% # If the answer is an essay answer then display it line by line.
-
- <%= c(split /\n/, $answers[$i])->join('
') =%>
-
+ % my @lines = split /\n/, $answers[$i];
+ % for (0 .. $#lines - 1) {
+ <%= $lines[$_] =%>
+ % }
+ <%= $lines[-1] =%>
% } elsif ($answerTypes[$i] && $answerTypes[$i] eq 'Value (Formula)') {
% # If its a formula then mark it as tex for MathJax.
`<%= $answers[$i] %>`
-
% } else {
% # If it isn't an essay or a formula then show it as text.
- <%= $answers[$i] %>
+ % my @parts = split("⍮", $answers[$i]);
+ % for (0 .. $#parts - 1) {
+ <%= $parts[$_] =%>⍮\
+ % }
+ <%= $parts[-1] =%>
% }
% }