mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-06-22 08:03:45 +08:00
fix(plugin): sanitize version history markdown (#496)
This commit is contained in:
@@ -137,7 +137,7 @@ async function loadPluginHistory() {
|
||||
}
|
||||
|
||||
async function loadPluginReleases(plugin: Plugin | null | undefined = resolvedPlugin.value, force = false) {
|
||||
if (!plugin?.id || !plugin?.repo_url || !plugin.release) {
|
||||
if (!plugin?.id || !plugin?.repo_url || !plugin?.release) {
|
||||
releaseDetail.value = null
|
||||
releaseError.value = ''
|
||||
return
|
||||
|
||||
@@ -3,9 +3,9 @@ import type { PropType } from 'vue'
|
||||
import MarkdownIt from 'markdown-it'
|
||||
import mdLinkAttributes from 'markdown-it-link-attributes'
|
||||
|
||||
// 初始化 markdown-it
|
||||
// 版本历史可能来自插件市场或 Release 内容,禁止透传原始 HTML,避免外部内容注入脚本或事件属性。
|
||||
const md = new MarkdownIt({
|
||||
html: true,
|
||||
html: false,
|
||||
linkify: true,
|
||||
typographer: true,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user