Skip to content

Commit 55e8e4a

Browse files
committed
Use \u001B instead of (hidden) ESC character
Signed-off-by: yubiuser <[email protected]>
1 parent b4af886 commit 55e8e4a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/js/gravity.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function parseLines(outputElement, text) {
9292
if (line[0] === "\r") {
9393
// This line starts with the "OVER" sequence. Replace them with "\n" before print
9494
// we also escape HTML to prevent XSS attacks
95-
line = utils.escapeHtml(line.replaceAll("\r[K", "\n").replaceAll("\r", "\n"));
95+
line = utils.escapeHtml(line.replaceAll("\r\u001B[K", "\n").replaceAll("\r", "\n"));
9696

9797
// Last line from the textarea will be overwritten, so we remove it
9898
const lastLineIndex = outputElement.innerHTML.lastIndexOf("\n");

0 commit comments

Comments
 (0)