forked from tools/josh
1
0
Fork 0

Escape HTML on input cancellation

Fixes #152.
This commit is contained in:
Florine W. Dekker 2020-12-07 15:13:22 +01:00
parent 93eecc6985
commit 3f106ef0fd
Signed by: FWDekker
GPG Key ID: B1B567AF58D6EE0F
2 changed files with 2 additions and 2 deletions

View File

@ -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",

View File

@ -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();