From a6a1c37ddf50650c36964447b6a1f13226d03d05 Mon Sep 17 00:00:00 2001 From: Christian Bager Bach Houmann Date: Sun, 25 Oct 2026 14:21:49 +0100 Subject: [PATCH 1/2] fix(choice-list): match non-ASCII names without a control character in the regex --- src/gui/choiceList/renderChoiceName.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/choiceList/renderChoiceName.ts b/src/gui/choiceList/renderChoiceName.ts index 5a554fcae..74a044615 100644 --- a/src/gui/choiceList/renderChoiceName.ts +++ b/src/gui/choiceList/renderChoiceName.ts @@ -6,7 +6,7 @@ import { createOwnedElement } from "../../utils/activeWindow"; * and anything outside ASCII. The Unicode line and paragraph separators are * left to the renderer, since a parser may treat them as line breaks. */ -const PLAIN_CHARACTERS = /^(?:[a-z0-9 ,.'"?;()-]|[^\x00-\x7f\u2028\u2029])+$/i; +const PLAIN_CHARACTERS = /^(?:[a-z0-9 ,.'"?;()-]|[^\p{ASCII}\u2028\u2029])+$/iu; /** Openings that still make a list or an indented code block from those characters. */ const BLOCK_OPENING = /^(?:[-\s]|\d+[.)](?:\s|$))/; From e25e74bf3853add585e461f14629e97937df595f Mon Sep 17 00:00:00 2001 From: Christian Bager Bach Houmann Date: Sun, 25 Oct 2026 14:27:25 +0100 Subject: [PATCH 2/2] fix(choice-list): use one character class so the name regex cannot backtrack --- src/gui/choiceList/renderChoiceName.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/choiceList/renderChoiceName.ts b/src/gui/choiceList/renderChoiceName.ts index 74a044615..cdfaaeff3 100644 --- a/src/gui/choiceList/renderChoiceName.ts +++ b/src/gui/choiceList/renderChoiceName.ts @@ -6,7 +6,7 @@ import { createOwnedElement } from "../../utils/activeWindow"; * and anything outside ASCII. The Unicode line and paragraph separators are * left to the renderer, since a parser may treat them as line breaks. */ -const PLAIN_CHARACTERS = /^(?:[a-z0-9 ,.'"?;()-]|[^\p{ASCII}\u2028\u2029])+$/iu; +const PLAIN_CHARACTERS = /^[a-z0-9 ,.'"?;()\-\u0080-\u2027\u202a-\u{10ffff}]+$/iu; /** Openings that still make a list or an indented code block from those characters. */ const BLOCK_OPENING = /^(?:[-\s]|\d+[.)](?:\s|$))/;