From 09dea89ba5b4de0347f9bf2b06a5c09426236004 Mon Sep 17 00:00:00 2001 From: wuhao <15392746632@qq.com> Date: Thu, 3 Dec 2020 20:05:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=AC=E4=B9=89=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pmcalendar.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pmcalendar.php b/pmcalendar.php index 47482e8..ee9ad4e 100644 --- a/pmcalendar.php +++ b/pmcalendar.php @@ -31,7 +31,7 @@ if ($act == 'newevent') { } else if ($act == 'edityunying') { $id = r('id'); $dict = array( - 'yunying_remark' => r('content') + 'yunying_remark' => stripslashes(r('content')) ); $sql = DB::update('calendar', $dict, "id='{$id}'"); @@ -40,7 +40,7 @@ if ($act == 'newevent') { } else if ($act == 'edityanfa') { $id = r('id'); $dict = array( - 'yanfa_remark' => r('content') + 'yanfa_remark' => stripslashes(r('content')) ); $sql = DB::update('calendar', $dict, "id='{$id}'"); @@ -49,7 +49,7 @@ if ($act == 'newevent') { } else if ($act == 'editchanpin') { $id = r('id'); $dict = array( - 'chanpin_remark' => r('content') + 'chanpin_remark' => stripslashes(r('content')) ); $sql = DB::update('calendar', $dict, "id='{$id}'"); @@ -785,7 +785,7 @@ if ($act == 'newevent') { arr = JSON.stringify(arr) $.ajax({ url: './?app=pmcalendar&act=editchanpin', - dataType: 'json', + dataType: 'application/x-www-form-urlencoded', type:"post", async:"true", data: { @@ -1325,6 +1325,7 @@ if ($act == 'newevent') { success: function (res) { $('#pop-title').html('【'+ res.game +'】'+ res.event + ':' + res.title ); // $("#cptext").val(res.yanfa_remark) + // res.chanpin_remark = res.chanpin_remark.replace('\\','') console.log(res.chanpin_remark) var chanpin_remark =JSON.parse(res.chanpin_remark) var yunying_remark = JSON.parse(res.yunying_remark);