Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Commit

Permalink
Remove newlines before comparing multiple choice answers
Browse files Browse the repository at this point in the history
fix #44356

Test plan: Resist suicidal urges while testing divisibility exercise in IE8

Auditors: alpert, cbhl
  • Loading branch information
beneater committed Apr 9, 2013
1 parent c4f46b5 commit aac2fa7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utils/answer-types.js
Expand Up @@ -1308,7 +1308,8 @@ Khan.answerTypes = $.extend(Khan.answerTypes, {
.fadeIn("fast");
});
return true;
} else if ($.trim(guess) === $.trim(correct)) {
} else if ($.trim(guess.replace(/\r\n?|\n/g, "")) ===
$.trim(correct.replace(/\r\n?|\n/g, ""))) {
return true;
}

Expand Down

0 comments on commit aac2fa7

Please sign in to comment.