Index: vobject/icalendar.py
===================================================================
--- vobject/icalendar.py	(revision 212)
+++ vobject/icalendar.py	(working copy)
@@ -1661,9 +1661,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 212)
+++ vobject/icalendar.py	(working copy)
@@ -426,6 +426,18 @@
 
                         if dtstart.tzinfo is not None:
                             until = until.astimezone(dtstart.tzinfo)
+                        
+                        # RFC2445 actually states that UNTIL must be a UTC value. Whilst the
+                        # changes above work OK, one problem case is if DTSTART is floating but
+                        # UNTIL is properly specified as UTC (or with a TZID). In that case dateutil
+                        # will fail datetime comparisons. There is no easy solution to this as
+                        # there is no obvious timezone (at this point) to do proper floating time
+                        # offset compisons. The best we can do is treat the UNTIL value as floating.
+                        # This could mean incorrect determination of the last instance. The better
+                        # solution here is to encourage clients to use COUNT rather than UNTIL
+                        # when DTSTART is floating.
+                        if dtstart.tzinfo is None:
+                            until = until.replace(tzinfo=None)
 
                         rule._until = until
                     
@@ -1661,9 +1673,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:

Handle case of floating time DTSTART and UTC UNTIL.
Handle case of floating time DTSTART and UTC UNTIL.

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