Bug 468020 - "Regex used to parse RFC3339 dates is incorrect" [r=philipp]
authorPatrick Cloke <DarkJedi613@Yahoo.com>
Mon, 08 Dec 2008 09:49:01 +0000
changeset 1368 03173247272642e62e5cce722cd3387d71e18299
parent 1367 585097dc9df594d981c63b36cf562496c5e864dc
child 1369 8e8a945d32307f4dda7aee11c623e78f5095ab98
push idunknown
push userunknown
push dateunknown
reviewersphilipp
bugs468020
Bug 468020 - "Regex used to parse RFC3339 dates is incorrect" [r=philipp]
calendar/providers/gdata/components/calGoogleUtils.js
--- a/calendar/providers/gdata/components/calGoogleUtils.js
+++ b/calendar/providers/gdata/components/calGoogleUtils.js
@@ -197,17 +197,17 @@ function fromRFC3339(aStr, aTimezone) {
     // be done. The only reference to leap seconds I found is bug 227329.
     //
 
     // Create a DateTime instance (calUtils.js)
     let dateTime = cal.createDateTime();
 
     // Killer regex to parse RFC3339 dates
     var re = new RegExp("^([0-9]{4})-([0-9]{2})-([0-9]{2})" +
-        "([Tt]([0-9]{2}):([0-9]{2}):([0-9]{2})(\.[0-9]+)?)?" +
+        "([Tt]([0-9]{2}):([0-9]{2}):([0-9]{2})(\\.[0-9]+)?)?" +
         "(([Zz]|([+-])([0-9]{2}):([0-9]{2})))?");
 
     var matches = re.exec(aStr);
 
     if (!matches) {
         return null;
     }