summaryrefslogtreecommitdiff
path: root/email/email.scm
diff options
context:
space:
mode:
authorArun Isaac2025-02-09 22:08:22 +0000
committerArun Isaac2025-02-09 22:08:22 +0000
commit9a82ce70b9eded77a148336feb8913156a31bab8 (patch)
treef0a51a96851be73305db73372f42e53139720479 /email/email.scm
parent912384e819c5e57c72a043de326f43356aeef908 (diff)
downloadguile-email-9a82ce70b9eded77a148336feb8913156a31bab8.tar.gz
guile-email-9a82ce70b9eded77a148336feb8913156a31bab8.tar.lz
guile-email-9a82ce70b9eded77a148336feb8913156a31bab8.zip
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.
Diffstat (limited to 'email/email.scm')
-rw-r--r--email/email.scm6
1 files changed, 3 insertions, 3 deletions
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 <arunisaac@systemreboot.net>
+;;; Copyright © 2018, 2019, 2020, 2021, 2023, 2025 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2021 Mathieu Othacehe <othacehe@gnu.org>
;;; Copyright © 2023 Andrew Whatson <whatson@tailcall.au>
;;;
@@ -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)