mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-07-01 14:44:56 +08:00
调整markdown安全级别
This commit is contained in:
parent
3fd3cb1fbe
commit
645409c849
@ -4,6 +4,7 @@
|
||||
- 增加移动端支付选项配置
|
||||
- 首页增加秒杀,直播,提问,文章接口
|
||||
- 增加秒杀列表列表接口
|
||||
- 调整markdown解析安全级别
|
||||
- 精简取消点赞以及取消收藏逻辑
|
||||
- 修复浮点转整型精度丢失造成的支付回调失败
|
||||
- 修复竖屏直播时造成的位置错乱
|
||||
|
@ -1205,7 +1205,7 @@ class AuthNode extends Service
|
||||
],
|
||||
[
|
||||
'id' => '5-1-12',
|
||||
'title' => '开放登录',
|
||||
'title' => '登录设置',
|
||||
'type' => 'menu',
|
||||
'route' => 'admin.setting.oauth',
|
||||
],
|
||||
|
@ -413,7 +413,7 @@ function kg_cos_icon_url($path, $style = null)
|
||||
/**
|
||||
* 清除存储图片处理样式
|
||||
*
|
||||
* @param $path
|
||||
* @param string $path
|
||||
* @return string
|
||||
*/
|
||||
function kg_cos_img_style_trim($path)
|
||||
@ -424,16 +424,18 @@ function kg_cos_img_style_trim($path)
|
||||
/**
|
||||
* 解析markdown内容
|
||||
*
|
||||
* @param $content
|
||||
* @param string $content
|
||||
* @param string $htmlInput (escape|strip)
|
||||
* @param bool $allowUnsafeLinks
|
||||
* @return string
|
||||
*/
|
||||
function kg_parse_markdown($content)
|
||||
function kg_parse_markdown($content, $htmlInput = 'escape', $allowUnsafeLinks = false)
|
||||
{
|
||||
$content = str_replace('!content_800', '', $content);
|
||||
|
||||
$parser = new League\CommonMark\GithubFlavoredMarkdownConverter([
|
||||
'html_input' => 'strip',
|
||||
'allow_unsafe_links' => false,
|
||||
'html_input' => $htmlInput,
|
||||
'allow_unsafe_links' => $allowUnsafeLinks,
|
||||
]);
|
||||
|
||||
return $parser->convertToHtml($content);
|
||||
@ -442,7 +444,7 @@ function kg_parse_markdown($content)
|
||||
/**
|
||||
* 解析内容摘要
|
||||
*
|
||||
* @param $content
|
||||
* @param string $content
|
||||
* @param int $length
|
||||
* @return string
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user