From e1d513a963904bfcacaf0d3d45d8c4d678ba0d1b Mon Sep 17 00:00:00 2001 From: aryapradipta9 <aryapradipta9@gmail.com> Date: Thu, 19 Apr 2018 19:56:49 +0700 Subject: [PATCH] escape slashes --- sendNotif.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sendNotif.php b/sendNotif.php index 30be0c6..8b5f588 100755 --- a/sendNotif.php +++ b/sendNotif.php @@ -43,14 +43,14 @@ class FirebaseNotif "id" => $id ] ]; - echo json_encode($vars); + echo json_encode($vars, JSON_UNESCAPED_SLASHES); // $cat = $_POST["kategori"]; // if ($cat == "pengumuman" ) { $vars["notification"]["click_action"] = "mainActivity"; //testing // $vars["data"] = array("id" => $_POST["id"]); // } - curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($vars)); //Post Fields + curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($vars, JSON_UNESCAPED_SLASHES)); //Post Fields curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $headers = [ 'Authorization: key=AIzaSyDhcKAiH6wOm8QhHLnYZzrri8SyZZtcoe4', -- GitLab