diff options
| author | fpi | 2024-09-17 21:56:00 +0200 | 
|---|---|---|
| committer | fpi | 2024-09-17 21:56:00 +0200 | 
| commit | 99bcba6a6b26b8d88ada51acfb0620eb3b8e5a97 (patch) | |
| tree | b813b35ee3247c3bf5598fd99bea91b605f22058 | |
| parent | New mapping of message mail adresses to icalendar values (diff) | |
Ensure proper property value quoting
| -rw-r--r-- | gnus-icalendar-request.el | 9 | 
1 files changed, 6 insertions, 3 deletions
diff --git a/gnus-icalendar-request.el b/gnus-icalendar-request.el index b7e9613..498e063 100644 --- a/gnus-icalendar-request.el +++ b/gnus-icalendar-request.el @@ -90,8 +90,8 @@  (defun gnus-icalendar--format-ical-property-parameters (item)    "Format a cons ITEM according to RFC5545 rules. -Car of ITEM is the value and the cdr is an alist of additional -property parameters attached to the value." +Car of ITEM is the property value and the cdr is an alist of additional +property parameters."    (format "%s:%s"            (seq-reduce             (lambda (a b) (format "%s;%s=%s" a (car b) (cdr b))) @@ -107,7 +107,10 @@ Optional argument ALIST specifies will be appended to the entry."          (append           alist           (when (cdr entry) -           `((CN . ,(cdr entry))))))) +           `((CN . ,(if (string-match "[:;,]" (cdr entry)) +                        ;; quote property value if necessary +                        (format "\"%s\"" (cdr entry)) +                      (cdr entry))))))))  ;;;###autoload  (defun gnus-icalendar-from-message-and-insert (&optional date location)  | 
