HTML outputs can now be selected and handle control characters correctly

This commit is contained in:
n1474335 2022-07-18 18:39:41 +01:00
parent 0dc2322269
commit 7c8a185a3d
16 changed files with 319 additions and 124 deletions

View file

@ -86,12 +86,12 @@ class ROT13BruteForce extends Operation {
}
const rotatedString = Utils.byteArrayToUtf8(rotated);
if (rotatedString.toLowerCase().indexOf(cribLower) >= 0) {
const rotatedStringPrintable = Utils.printable(rotatedString, false);
const rotatedStringEscaped = Utils.escapeWhitespace(rotatedString);
if (printAmount) {
const amountStr = "Amount = " + (" " + amount).slice(-2) + ": ";
result.push(amountStr + rotatedStringPrintable);
result.push(amountStr + rotatedStringEscaped);
} else {
result.push(rotatedStringPrintable);
result.push(rotatedStringEscaped);
}
}
}