From 6fae1bd0bbb79196af852b2ab82c16ed5c81bd2b Mon Sep 17 00:00:00 2001 From: devil_gong Date: Wed, 20 Feb 2019 16:18:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E7=AC=A6=E4=B8=B2=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/service/ArticleService.php | 5 ++++- application/service/CustomViewService.php | 5 ++++- application/service/GoodsService.php | 5 ++++- config/app.php | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/application/service/ArticleService.php b/application/service/ArticleService.php index 604463909..c51fe5f5a 100755 --- a/application/service/ArticleService.php +++ b/application/service/ArticleService.php @@ -184,8 +184,11 @@ class ArticleService return DataReturn($ret, -1); } + // 编辑器内容 + $content = isset($_POST['content']) ? $_POST['content'] : ''; + // 数据 - $content = ResourcesService::ContentStaticReplace($params['content'], 'add'); + $content = ResourcesService::ContentStaticReplace($content, 'add'); $image = self::MatchContentImage($content); $data = [ 'title' => $params['title'], diff --git a/application/service/CustomViewService.php b/application/service/CustomViewService.php index 5e3ba2c76..fc6001860 100755 --- a/application/service/CustomViewService.php +++ b/application/service/CustomViewService.php @@ -190,8 +190,11 @@ class CustomViewService return DataReturn($ret, -1); } + // 编辑器内容 + $content = isset($_POST['content']) ? $_POST['content'] : ''; + // 数据 - $content = ResourcesService::ContentStaticReplace($params['content'], 'add'); + $content = ResourcesService::ContentStaticReplace($content, 'add'); $image = self::MatchContentImage($content); $data = [ 'title' => $params['title'], diff --git a/application/service/GoodsService.php b/application/service/GoodsService.php index 103b6149d..98b7615b0 100755 --- a/application/service/GoodsService.php +++ b/application/service/GoodsService.php @@ -955,6 +955,9 @@ class GoodsService return $attachment; } + // 编辑器内容 + $content_web = isset($_POST['content_web']) ? $_POST['content_web'] : ''; + // 基础数据 $data = [ 'title' => $params['title'], @@ -967,7 +970,7 @@ class GoodsService 'buy_max_number' => isset($params['buy_max_number']) ? intval($params['buy_max_number']) : 0, 'is_deduction_inventory' => isset($params['is_deduction_inventory']) ? intval($params['is_deduction_inventory']) : 0, 'is_shelves' => isset($params['is_shelves']) ? intval($params['is_shelves']) : 0, - 'content_web' => ResourcesService::ContentStaticReplace($params['content_web'], 'add'), + 'content_web' => ResourcesService::ContentStaticReplace($content_web, 'add'), 'images' => isset($photo['data'][0]) ? $photo['data'][0] : '', 'photo_count' => count($photo['data']), 'is_home_recommended' => isset($params['is_home_recommended']) ? intval($params['is_home_recommended']) : 0, diff --git a/config/app.php b/config/app.php index e49ce03ca..bfda0c3b5 100755 --- a/config/app.php +++ b/config/app.php @@ -41,7 +41,7 @@ return [ // 是否开启多语言 'lang_switch_on' => false, // 默认全局过滤方法 用逗号分隔多个 - 'default_filter' => '', + 'default_filter' => 'htmlspecialchars', // 默认语言 'default_lang' => 'zh-cn', // 应用类库后缀