mirror of
https://github.com/chaos-zhu/easynode.git
synced 2026-10-07 15:57:53 +08:00
Merge pull request #162 from molikai-work/main
🚑 为ai-chat组件渲染a标签时添加安全属性
This commit is contained in:
@@ -150,6 +150,13 @@ const md = new MarkdownIt({
|
||||
}
|
||||
})
|
||||
|
||||
md.renderer.rules.link_open = function (tokens, idx, options, env, self) {
|
||||
const token = tokens[idx]
|
||||
token.attrSet('target', '_blank')
|
||||
token.attrSet('rel', 'noopener noreferrer')
|
||||
return self.renderToken(tokens, idx, options)
|
||||
}
|
||||
|
||||
const { proxy: { $message, $store } } = getCurrentInstance()
|
||||
|
||||
const props = defineProps({
|
||||
|
||||
Reference in New Issue
Block a user