浏览代码

Escape special key

Sebastián Katzer 11 年之前
父节点
当前提交
60af42b4d3
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/ios/APPLocalNotification.m

+ 3 - 0
src/ios/APPLocalNotification.m

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