Skip to content

Commit

Permalink
fix(news): 修复资讯前台投稿未做 Markdown 转换处理
Browse files Browse the repository at this point in the history
  • Loading branch information
medz committed Oct 31, 2018
1 parent af821ff commit 0009250
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -410,10 +410,13 @@ public function newStore(
return $response->json(['message' => '未认证用户不可投稿'], 403);
}

$map = $request->only(['title', 'content', 'subject']);
$map = $request->only(['title', 'subject']);
$map['from'] = $request->input('from') ?: '原创';
$map['author'] = $request->input('author') ?: $user->name;
$map['storage'] = $request->input('image');
$map['content'] = $this->app->make(Markdown::class)->safetyMarkdown(
$request->input('content', '')
);

$images = $this->findMarkdownImageNotWithModels($map['content'] ?: '');
// 提取内容中的图片,用于列表种的多种UI展示
Expand Down

0 comments on commit 0009250

Please sign in to comment.