Browse Source

Escape special key

Sebastián Katzer 11 years ago
parent
commit
60af42b4d3
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/ios/APPLocalNotification.m

+ 3 - 0
src/ios/APPLocalNotification.m

@@ -604,6 +604,9 @@
         NSString* json = notification.options.json;
         NSString* json = notification.options.json;
         NSString* args = [notification encodeToJSON];
         NSString* args = [notification encodeToJSON];
 
 
+        json = [json stringByReplacingOccurrencesOfString:@"'"
+                                               withString:@"\\\\\\'"];
+
         params = [NSString stringWithFormat:
         params = [NSString stringWithFormat:
                   @"\"%@\",\"%@\",\\'%@\\',JSON.parse(\\'%@\\')",
                   @"\"%@\",\"%@\",\\'%@\\',JSON.parse(\\'%@\\')",
                   id, self.applicationState, json, args];
                   id, self.applicationState, json, args];