From 3f106ef0fd14833c97d472d36229e3713b5f4d14 Mon Sep 17 00:00:00 2001 From: "Felix W. Dekker" Date: Mon, 7 Dec 2020 15:13:22 +0100 Subject: [PATCH] Escape HTML on input cancellation Fixes #152. --- package.json | 2 +- src/main/js/Terminal.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ba333cc..0f9d550 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fwdekker.com", - "version": "0.39.5", + "version": "0.39.6", "description": "The source code of [my personal website](https://fwdekker.com/).", "author": "Felix W. Dekker", "browser": "dist/bundle.js", diff --git a/src/main/js/Terminal.ts b/src/main/js/Terminal.ts index 236adfe..f72d7a4 100644 --- a/src/main/js/Terminal.ts +++ b/src/main/js/Terminal.ts @@ -239,7 +239,7 @@ export class Terminal { * Moves to the next input line without processing the current input line. */ private ignoreInput(): void { - this.outputText += `${this.prefixText}${this.inputText}\n`; + this.outputText += `${this.prefixText}${escapeHtml(this.inputText)}\n`; this.prefixText = this.shell.generatePrefix(); this.inputText = ""; this.inputHistory.resetIndex();