From 1ec81ef2df70be6e9015cedd3804e0496c2311c1 Mon Sep 17 00:00:00 2001 From: Anyon Date: Fri, 12 May 2017 17:32:20 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E4=BF=AE=E6=94=B9=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E5=9B=BE=E6=96=87=E6=91=98=E8=A6=81=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/wechat/controller/News.php | 2 +- application/wechat/view/news.form.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/wechat/controller/News.php b/application/wechat/controller/News.php index 89af09313..bad07bb39 100644 --- a/application/wechat/controller/News.php +++ b/application/wechat/controller/News.php @@ -109,7 +109,7 @@ 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['digest'] = empty($vo['digest']) ? mb_substr(strip_tags($vo['content']), 0, 120) : $vo['digest']; + $vo['digest'] = empty($vo['digest']) ? mb_substr(strip_tags(str_replace(["\s", ' '], '', $vo['content'])), 0, 120) : $vo['digest']; if (empty($vo['id'])) { $result = $id = Db::name('WechatNewsArticle')->insertGetId($vo); } else { diff --git a/application/wechat/view/news.form.html b/application/wechat/view/news.form.html index d1feff639..59ea1e26e 100644 --- a/application/wechat/view/news.form.html +++ b/application/wechat/view/news.form.html @@ -83,7 +83,7 @@
- +