mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-11 06:05:16 +08:00
fixed quotes not working in words history
This commit is contained in:
parent
86e4046a10
commit
4c6224336d
1 changed files with 4 additions and 4 deletions
|
@ -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 = `<div class='word' input='${correctedHistory[i]}'>`;
|
||||
wordEl = `<div class='word' input="${correctedHistory[i].replace(/"/g, """)}">`;
|
||||
} else {
|
||||
wordEl = `<div class='word' input='${input}'>`;
|
||||
wordEl = `<div class='word' input="${input.replace(/"/g, """)}">`;
|
||||
}
|
||||
if (input !== wordsList[i]) {
|
||||
wordEl = `<div class='word error' input='${input}'>`;
|
||||
wordEl = `<div class='word error' input="${input.replace(/"/g, """)}">`;
|
||||
}
|
||||
|
||||
let loop;
|
||||
|
|
Loading…
Reference in a new issue