|
@@ -87,12 +87,14 @@ class PostRepository
|
|
|
$topicIds = implode(',', $topicIdsArray);
|
|
|
|
|
|
//验证内容字数
|
|
|
- $html = strip_tags($request['content']);
|
|
|
- if (mb_strlen($html, 'UTF8') > 1000) {
|
|
|
- return Response::create([
|
|
|
- 'message' => '所传内容不能超过1000字',
|
|
|
- 'status_code' => 500
|
|
|
- ]);
|
|
|
+ if($request['type'] != 'html'){
|
|
|
+ $html = strip_tags($request['content']);
|
|
|
+ if (mb_strlen($html, 'UTF8') > 1000) {
|
|
|
+ return Response::create([
|
|
|
+ 'message' => '所传内容不能超过1000字',
|
|
|
+ 'status_code' => 500
|
|
|
+ ]);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
$data = [
|