Skip to content

Commit bb69bba

Browse files
committed
Using innerHTML instead of innerText to handle encoding problems on data coming back from API
1 parent 4cf19b6 commit bb69bba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Quiz App Master/game.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ getNewQuestion = () => {
7373

7474
const questionIndex = Math.floor(Math.random() * availableQuesions.length);
7575
currentQuestion = availableQuesions[questionIndex];
76-
question.innerText = currentQuestion.question;
76+
question.innerHTML = currentQuestion.question;
7777

7878
choices.forEach(choice => {
7979
const number = choice.dataset["number"];
80-
choice.innerText = currentQuestion["choice" + number];
80+
choice.innerHTML = currentQuestion["choice" + number];
8181
});
8282

8383
availableQuesions.splice(questionIndex, 1);

0 commit comments

Comments
 (0)