From RFC 5545, sections 3.7.3 (Product Identifier) and 3.7.4
(Version), these are both text fields.
# Copyright
+from . import text as _text
+
+
class Aggregator (list):
r"""An iCalendar feed aggregator
def write(self, stream):
stream.write('BEGIN:VCALENDAR\r\n')
- stream.write('VERSION:{}\r\n'.format(self.version))
- stream.write('PRODID:{}\r\n'.format(self.prodid))
+ stream.write('VERSION:{}\r\n'.format(_text.escape(self.version)))
+ stream.write('PRODID:{}\r\n'.format(_text.escape(self.prodid)))
for feed in self:
for entry in feed:
entry.write(stream=stream)