From 4c6224336d21df6727c72064886b5387972b08d0 Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 14 Sep 2020 09:45:58 +0100 Subject: [PATCH] fixed quotes not working in words history --- public/js/script.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/js/script.js b/public/js/script.js index 1c127e6ed..bf1a628ae 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -925,7 +925,7 @@ function compareInput(showError) { correctedHistory.push(currentCorrected); document .querySelector("#words .word.active") - .setAttribute("input", currentInput); + .setAttribute("input", currentInput.replace(/'/g, "\'")); showResult(true); } let testNow = Date.now(); @@ -3009,12 +3009,12 @@ async function loadWordsHistory() { try { if (input === "") throw Exception; if (correctedHistory[i] !== "") { - wordEl = `
`; + wordEl = `
`; } else { - wordEl = `
`; + wordEl = `
`; } if (input !== wordsList[i]) { - wordEl = `
`; + wordEl = `
`; } let loop;