Index: vobject/icalendar.py
===================================================================
--- vobject/icalendar.py	(revision 219)
+++ vobject/icalendar.py	(working copy)
@@ -1622,11 +1622,19 @@
 
 # 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"'
 
+# COLON included to work around Address Book's escaping it in vCard data,
+# despite the fact that it is similarly not supposed to be escaped.
+
+# Isn't it a bad idea to be lenient with \" ?
+if True:
+    escapableCharList = '\\;,Nn'
+else:
+    escapableCharList = '\\;:,Nn"'
+
 def stringToTextValues(s, listSeparator=',', charList=None, strict=False):
     """Returns list of strings."""
-    
+
     if charList is None:
         charList = escapableCharList
 
@@ -1675,9 +1683,10 @@
                 else:
                     current.append(char)
             else:
-                state = "read normal"
+                #state = "read normal"
                 # leave unrecognized escaped characters for later passes
-                current.append('\\' + char)
+                #current.append('\\' + char)
+                raise ParseError("error: illegal escape sequence: '\\%s'" % (char,))
 
         elif state == "end":    #an end state
             if len(current) or len(results) == 0:

Index: vobject/icalendar.py
===================================================================
--- vobject/icalendar.py	(revision 219)
+++ vobject/icalendar.py	(working copy)
@@ -1622,11 +1622,15 @@
 
 # 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"'
 
+# COLON included to work around Address Book's escaping it in vCard data,
+# despite the fact that it is similarly not supposed to be escaped.
+
+escapableCharList = '\\;:,Nn'
+
 def stringToTextValues(s, listSeparator=',', charList=None, strict=False):
     """Returns list of strings."""
-    
+
     if charList is None:
         charList = escapableCharList
 
@@ -1675,9 +1679,10 @@
                 else:
                     current.append(char)
             else:
-                state = "read normal"
+                #state = "read normal"
                 # leave unrecognized escaped characters for later passes
-                current.append('\\' + char)
+                #current.append('\\' + char)
+                raise ParseError("error: illegal escape sequence: '\\%s'" % (char,))
 
         elif state == "end":    #an end state
             if len(current) or len(results) == 0:

Allow colon character to be escaped since this is breaking current clients. In the near future we'll have the server clean up these illegal escapes rather than reject them.
Allow colon character to be escaped since this is breaking current clients.  In the near future we'll have the server clean up these illegal escapes rather than reject them.


git-svn-id: 81e381228600e5752b80483efd2b45b26c451ea2@5858 e27351fd-9f3e-4f54-a53b-843176b1656c
