From 820059070596fbf899162201ff87ddc60a64a935 Mon Sep 17 00:00:00 2001 From: Victor Varvaryuk Date: Tue, 19 Mar 2013 10:37:33 +0400 Subject: [PATCH 1/2] Added % symbol to some tests --- src/icalendar/tests/test_property_params.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/icalendar/tests/test_property_params.py b/src/icalendar/tests/test_property_params.py index b449ba6..bb44b58 100644 --- a/src/icalendar/tests/test_property_params.py +++ b/src/icalendar/tests/test_property_params.py @@ -80,17 +80,17 @@ class TestPropertyParams(unittest.TestCase): vevent = icalendar.Event.from_ical( 'BEGIN:VEVENT\r\n' - 'ORGANIZER;CN=that\\, that\\; that\\\\ that\\:' - ':это\\, то\\; that\\\\ that\\:\r\n' + 'ORGANIZER;CN=that\\, that\\; %th%%at%\\\\ that\\:' + ':это\\, то\\; that\\\\ %th%%at%\\:\r\n' 'END:VEVENT\r\n' ) self.assertEqual( vevent['ORGANIZER'].params['CN'], - r'that, that; that\ that:' + r'that, that; %th%%at%\ that:' ) self.assertEqual( vevent['ORGANIZER'], - r'это, то; that\ that:' + r'это, то; that\ %th%%at%:' ) def test_parameters_class(self): From 198654fbc68b433b70e24f7b18d410206ccceac8 Mon Sep 17 00:00:00 2001 From: Victor Varvaryuk Date: Tue, 19 Mar 2013 16:12:01 +0400 Subject: [PATCH 2/2] Added myself to the contributer list --- docs/credits.rst | 1 + src/icalendar/parser.py | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/docs/credits.rst b/docs/credits.rst index 77b0a50..8ef4acc 100644 --- a/docs/credits.rst +++ b/docs/credits.rst @@ -33,3 +33,4 @@ iCalendar contributors - spanktar - tgecho - Ronan Dunklau +- Victor Varvaryuk diff --git a/src/icalendar/parser.py b/src/icalendar/parser.py index 6ba6972..3c87e34 100644 --- a/src/icalendar/parser.py +++ b/src/icalendar/parser.py @@ -53,6 +53,12 @@ def tzid_from_dt(dt): def foldline(text, length=75, newline='\r\n'): """Make a string folded per RFC5545 (each line must be less than 75 octets) + Lines of text SHOULD NOT be longer than 75 octets, excluding the line + break. Long content lines SHOULD be split into a multiple line + representations using a line "folding" technique. That is, a long + line can be split between any two characters by inserting a CRLF + immediately followed by a single linear white-space character (i.e., + SPACE or HTAB). """ assert isinstance(text, str) # text.decode('utf-8') # try to decode, to be sure it's utf-8 or ASCII