From 9a82ce70b9eded77a148336feb8913156a31bab8 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sun, 9 Feb 2025 22:08:22 +0000 Subject: email: Tolerate square brackets in email addresses. * email/email.scm (liberal-atext): Add [ and ]. * tests/email.scm ("tolerate email addresses with square brackets in name"): New test. --- email/email.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'email') diff --git a/email/email.scm b/email/email.scm index a29a532..ff0f5e9 100644 --- a/email/email.scm +++ b/email/email.scm @@ -1,5 +1,5 @@ ;;; guile-email --- Guile email parser -;;; Copyright © 2018, 2019, 2020, 2021, 2023 Arun Isaac +;;; Copyright © 2018, 2019, 2020, 2021, 2023, 2025 Arun Isaac ;;; Copyright © 2021 Mathieu Othacehe ;;; Copyright © 2023 Andrew Whatson ;;; @@ -360,9 +360,9 @@ ;; MUAs tend to pass on these non-standard names without any ;; quoting. Tolerate such names. -;; Tolerate non-standard ( and ) in atext. +;; Tolerate non-standard (, ), [ and ] in atext. (define-peg-pattern liberal-atext body - (or atext "(" ")")) + (or atext "(" ")" "[" "]")) (define-atom-pattern liberal-cfws-captured-atom cfws liberal-atext) (define-word-pattern liberal-cfws-captured-word liberal-cfws-captured-atom) -- cgit v1.2.3