diff --git a/templates/ContentGenerator/Instructor/ProblemGrader.html.ep b/templates/ContentGenerator/Instructor/ProblemGrader.html.ep
index b2c267987e..7acf07273b 100644
--- a/templates/ContentGenerator/Instructor/ProblemGrader.html.ep
+++ b/templates/ContentGenerator/Instructor/ProblemGrader.html.ep
@@ -178,16 +178,21 @@
) %>">
% 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] =%>
% }
% }