From 49ad1b7b7354fcc2e196678b0d9f1c1739cf45c5 Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Wed, 18 Nov 2026 19:45:38 -0800 Subject: [PATCH] =?UTF-8?q?Catch=20a=20recovery=20phrase=20numbered=20"(1)?= =?UTF-8?q?=20=E2=80=A6=20(2)=20=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Manjunath Paparaju --- src/search/placeSuggestions.js | 2 +- src/search/placeSuggestions.test.mjs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/search/placeSuggestions.js b/src/search/placeSuggestions.js index dbea0c7dec..c252d2d2a3 100644 --- a/src/search/placeSuggestions.js +++ b/src/search/placeSuggestions.js @@ -221,7 +221,7 @@ function privacyReason(text) { const recent = []; for (const token of line.toLowerCase().split(/[\s,;]+/)) { const word = token - .replace(/^\d+[.)]?/, '') + .replace(/^\(?\d+[.)]?/, '') .replace(/(?<=[a-z])[^a-z]+$/, ''); if (!word && token) continue; if (!isBip39Word(word)) { diff --git a/src/search/placeSuggestions.test.mjs b/src/search/placeSuggestions.test.mjs index e05b6fa3e6..65a120336c 100644 --- a/src/search/placeSuggestions.test.mjs +++ b/src/search/placeSuggestions.test.mjs @@ -471,6 +471,7 @@ test('spelled-out emails, addresses, phrases, codes and short phone numbers stay 'verification code ABCDEF thanks a lot', 'otp ABCDEF cheers', 'otp ab12cd - thanks', + '(1) abandon (2) ability (3) able (4) about (5) above (6) absent (7) absorb (8) abstract (9) absurd (10) abuse (11) access (12) accident', 'gate code aBcD - thanks', 'abandon ability able about above absent absorb abstract absurd abuse access accident.', 'abandon, ability, able, about, above, absent, absorb, abstract, absurd, abuse, access, accident',