diff --git a/application/wechat/controller/Keys.php b/application/wechat/controller/Keys.php index d2d67a0fe..d4f1d71e3 100644 --- a/application/wechat/controller/Keys.php +++ b/application/wechat/controller/Keys.php @@ -180,7 +180,6 @@ class Keys extends BasicAdmin if ($this->request->isPost() && isset($data['keys'])) { $db = Db::name($this->table)->where('keys', $data['keys']); !empty($data['id']) && $db->where('id', 'neq', $data['id']); - $data['content'] = htmlspecialchars_decode($data['content']); $db->count() > 0 && $this->error('关键字已经存在,请使用其它关键字!'); } } diff --git a/application/wechat/controller/News.php b/application/wechat/controller/News.php index 48766ad3e..a34397874 100644 --- a/application/wechat/controller/News.php +++ b/application/wechat/controller/News.php @@ -172,7 +172,6 @@ class News extends BasicAdmin foreach ($data as &$vo) { $vo['create_by'] = session('user.id'); $vo['create_at'] = date('Y-m-d H:i:s'); - $vo['content'] = htmlspecialchars_decode($vo['content']); if (empty($vo['digest'])) { $vo['digest'] = mb_substr(strip_tags(str_replace(["\s", ' '], '', $vo['content'])), 0, 120); } @@ -280,7 +279,7 @@ class News extends BasicAdmin $article['content'] = preg_replace_callback("//i", function ($matches) { $src = MediaService::uploadImage($matches[2]); return ""; - }, htmlspecialchars_decode($article['content'])); + }, $article['content']); } $wechat = WechatService::media(); // 如果已经上传过,先删除之前的历史记录 diff --git a/application/wechat/controller/Review.php b/application/wechat/controller/Review.php index c656e4021..f84c20024 100644 --- a/application/wechat/controller/Review.php +++ b/application/wechat/controller/Review.php @@ -48,7 +48,6 @@ class Review extends Controller if (!empty($article['content_source_url'])) { $this->redirect($article['content_source_url']); } - $article['content'] = htmlspecialchars_decode($article['content']); $this->assign('vo', $article); } $this->assign('type', $type);