From b47aba5400098ab620dd54211c45a5f5fb9602e3 Mon Sep 17 00:00:00 2001 From: jaca Date: Thu, 15 Dec 2022 20:37:57 +0100 Subject: [PATCH] alaways pass string representation of calendar object to dquote --- src/icalendar/parser.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/icalendar/parser.py b/src/icalendar/parser.py index 47f0b684..0ad2e110 100644 --- a/src/icalendar/parser.py +++ b/src/icalendar/parser.py @@ -102,7 +102,10 @@ def param_value(value): """ if isinstance(value, SEQUENCE_TYPES): return q_join(value) - return dquote(value) + elif isinstance(value, str): + return dquote(value) + else: + return dquote(value.to_ical().decode(DEFAULT_ENCODING)) # Could be improved