[CalendarServer-changes] [4981] CalendarServer/branches/users/glyph/contacts-server-merge/ lib-patches/vobject
source_changes at macosforge.org
source_changes at macosforge.org
Fri Jan 29 09:53:25 PST 2010
Revision: 4981
http://trac.macosforge.org/projects/calendarserver/changeset/4981
Author: glyph at apple.com
Date: 2010-01-29 09:53:22 -0800 (Fri, 29 Jan 2010)
Log Message:
-----------
vobject patches necessary to play nicely with addressbook
Modified Paths:
--------------
CalendarServer/branches/users/glyph/contacts-server-merge/lib-patches/vobject/vobject.icalendar.patch
Added Paths:
-----------
CalendarServer/branches/users/glyph/contacts-server-merge/lib-patches/vobject/vobject.base.patch
CalendarServer/branches/users/glyph/contacts-server-merge/lib-patches/vobject/vobject.vcard.patch
Added: CalendarServer/branches/users/glyph/contacts-server-merge/lib-patches/vobject/vobject.base.patch
===================================================================
--- CalendarServer/branches/users/glyph/contacts-server-merge/lib-patches/vobject/vobject.base.patch (rev 0)
+++ CalendarServer/branches/users/glyph/contacts-server-merge/lib-patches/vobject/vobject.base.patch 2010-01-29 17:53:22 UTC (rev 4981)
@@ -0,0 +1,20 @@
+Index: vobject/base.py
+===================================================================
+--- vobject/base.py (revision 219)
++++ vobject/base.py (working copy)
+@@ -1051,10 +1051,11 @@
+ component=stack.pop()
+ if versionLine is not None:
+ component.setBehaviorFromVersionLine(versionLine)
+- else:
+- behavior = getBehavior(component.name)
+- if behavior:
+- component.setBehavior(behavior)
++ # calendarserver.org: be strict about what we accept
++ #else:
++ # behavior = getBehavior(component.name)
++ # if behavior:
++ # component.setBehavior(behavior)
+ if validate: component.validate(raiseException=True)
+ if transform: component.transformChildrenToNative()
+ yield component #EXIT POINT
Modified: CalendarServer/branches/users/glyph/contacts-server-merge/lib-patches/vobject/vobject.icalendar.patch
===================================================================
--- CalendarServer/branches/users/glyph/contacts-server-merge/lib-patches/vobject/vobject.icalendar.patch 2010-01-29 17:37:14 UTC (rev 4980)
+++ CalendarServer/branches/users/glyph/contacts-server-merge/lib-patches/vobject/vobject.icalendar.patch 2010-01-29 17:53:22 UTC (rev 4981)
@@ -2,7 +2,22 @@
===================================================================
--- vobject/icalendar.py (revision 219)
+++ vobject/icalendar.py (working copy)
-@@ -1675,9 +1675,10 @@
+@@ -1623,12 +1623,13 @@
+ # DQUOTE included to work around iCal's penchant for backslash escaping it,
+ # although it isn't actually supposed to be escaped according to rfc2445 TEXT
+ escapableCharList = '\\;,Nn"'
++strictEscapableCharList = '\\;,Nn'
+
+ def stringToTextValues(s, listSeparator=',', charList=None, strict=False):
+ """Returns list of strings."""
+
+ if charList is None:
+- charList = escapableCharList
++ charList = strictEscapableCharList
+
+ def escapableChar (c):
+ return c in charList
+@@ -1675,9 +1676,10 @@
else:
current.append(char)
else:
Added: CalendarServer/branches/users/glyph/contacts-server-merge/lib-patches/vobject/vobject.vcard.patch
===================================================================
--- CalendarServer/branches/users/glyph/contacts-server-merge/lib-patches/vobject/vobject.vcard.patch (rev 0)
+++ CalendarServer/branches/users/glyph/contacts-server-merge/lib-patches/vobject/vobject.vcard.patch 2010-01-29 17:53:22 UTC (rev 4981)
@@ -0,0 +1,13 @@
+Index: vobject/vcard.py
+===================================================================
+--- vobject/vcard.py (revision 218)
++++ vobject/vcard.py (working copy)
+@@ -210,7 +210,7 @@
+ def splitFields(string):
+ """Return a list of strings or lists from a Name or Address."""
+ return [toListOrString(i) for i in
+- stringToTextValues(string, listSeparator=';', charList=';')]
++ stringToTextValues(string, listSeparator=';')]
+
+ def toList(stringOrList):
+ if isinstance(stringOrList, basestring):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100129/cb511f8f/attachment.html>
More information about the calendarserver-changes
mailing list