From 042afe4157ded31bd74d60f6bec21987bcfb7426 Mon Sep 17 00:00:00 2001 From: Zack Zhou Date: Mon, 9 Feb 2026 17:17:36 +0800 Subject: [PATCH 1/2] Fix freeze when output text decoding fails (#1573) --- src/web/workers/DishWorker.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/web/workers/DishWorker.mjs b/src/web/workers/DishWorker.mjs index 4bfb701f..662f3ffc 100644 --- a/src/web/workers/DishWorker.mjs +++ b/src/web/workers/DishWorker.mjs @@ -7,6 +7,8 @@ */ import Dish from "../../core/Dish.mjs"; +import DishError from "../../core/errors/DishError.mjs"; +import { CHR_ENC_SIMPLE_REVERSE_LOOKUP } from "../../core/lib/ChrEnc.mjs"; import Utils from "../../core/Utils.mjs"; import cptable from "codepage"; import loglevelMessagePrefix from "loglevel-message-prefix"; @@ -98,7 +100,7 @@ async function bufferToStr(data) { try { str = cptable.utils.decode(data.encoding, new Uint8Array(data.buffer)); } catch (err) { - str = err; + str = new DishError(`Error decoding buffer with encoding ${CHR_ENC_SIMPLE_REVERSE_LOOKUP[data.encoding]}: ${err.message}`).toString(); } } From 595c90a4646bde182d82e0779d8072a218d27939 Mon Sep 17 00:00:00 2001 From: Wes <5124946+wesinator@users.noreply.github.com> Date: Mon, 9 Feb 2026 05:01:25 -0500 Subject: [PATCH 2/2] Quoted Printable - consistent reference to 'email' (#2186) --- src/core/operations/FromQuotedPrintable.mjs | 2 +- src/core/operations/ToQuotedPrintable.mjs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/operations/FromQuotedPrintable.mjs b/src/core/operations/FromQuotedPrintable.mjs index 7dce45b6..4854c150 100644 --- a/src/core/operations/FromQuotedPrintable.mjs +++ b/src/core/operations/FromQuotedPrintable.mjs @@ -23,7 +23,7 @@ class FromQuotedPrintable extends Operation { this.name = "From Quoted Printable"; this.module = "Default"; - this.description = "Converts QP-encoded text back to standard text.

e.g. The quoted-printable encoded string hello=20world becomes hello world"; + this.description = "Converts QP-encoded text back to standard text. This format is a content transfer encoding common in email messages.

e.g. The quoted-printable encoded string hello=20world becomes hello world"; this.infoURL = "https://wikipedia.org/wiki/Quoted-printable"; this.inputType = "string"; this.outputType = "byteArray"; diff --git a/src/core/operations/ToQuotedPrintable.mjs b/src/core/operations/ToQuotedPrintable.mjs index 9db5c5a5..2ea204f9 100644 --- a/src/core/operations/ToQuotedPrintable.mjs +++ b/src/core/operations/ToQuotedPrintable.mjs @@ -23,7 +23,7 @@ class ToQuotedPrintable extends Operation { this.name = "To Quoted Printable"; this.module = "Default"; - this.description = "Quoted-Printable, or QP encoding, is an encoding using printable ASCII characters (alphanumeric and the equals sign '=') to transmit 8-bit data over a 7-bit data path or, generally, over a medium which is not 8-bit clean. It is defined as a MIME content transfer encoding for use in e-mail.

QP works by using the equals sign '=' as an escape character. It also limits line length to 76, as some software has limits on line length."; + this.description = "Quoted-Printable, or QP encoding, is an encoding using printable ASCII characters (alphanumeric and the equals sign '=') to transmit 8-bit data over a 7-bit data path or, generally, over a medium which is not 8-bit clean. It is defined as a MIME content transfer encoding for use in email.

QP works by using the equals sign '=' as an escape character. It also limits line length to 76, as some software has limits on line length."; this.infoURL = "https://wikipedia.org/wiki/Quoted-printable"; this.inputType = "ArrayBuffer"; this.outputType = "string";