[CalendarServer-changes] [11005] PyCalendar/trunk/src/pycalendar/utils.py

source_changes at macosforge.org source_changes at macosforge.org
Fri Apr 5 12:40:56 PDT 2013


Revision: 11005
          http://trac.calendarserver.org//changeset/11005
Author:   cdaboo at apple.com
Date:     2013-04-05 12:40:56 -0700 (Fri, 05 Apr 2013)
Log Message:
-----------
Match final parameter encoding behavior.

Modified Paths:
--------------
    PyCalendar/trunk/src/pycalendar/utils.py

Modified: PyCalendar/trunk/src/pycalendar/utils.py
===================================================================
--- PyCalendar/trunk/src/pycalendar/utils.py	2013-04-05 19:16:26 UTC (rev 11004)
+++ PyCalendar/trunk/src/pycalendar/utils.py	2013-04-05 19:40:56 UTC (rev 11005)
@@ -197,15 +197,15 @@
 
 
 def encodeParameterValue(value):
+    """
+    RFC6868 parameter encoding.
+    """
 
     encoded = []
     last = ''
     for c in value:
-        if c == '\t':
+        if c == '\r':
             encoded.append('^')
-            encoded.append('t')
-        elif c == '\r':
-            encoded.append('^')
             encoded.append('n')
         elif c == '\n':
             if last != '\r':
@@ -226,6 +226,9 @@
 
 
 def decodeParameterValue(value):
+    """
+    RFC6868 parameter decoding.
+    """
 
     if value is None:
         return None
@@ -233,9 +236,7 @@
     last = ''
     for c in value:
         if last == '^':
-            if c == 't':
-                decoded.append('\t')
-            elif c == 'n':
+            if c == 'n':
                 decoded.append('\n')
             elif c == '\'':
                 decoded.append('"')
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130405/827f9c03/attachment.html>


More information about the calendarserver-changes mailing list