mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-07 16:56:40 +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) {
|
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
|
releaseDetail.value = null
|
||||||
releaseError.value = ''
|
releaseError.value = ''
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ import type { PropType } from 'vue'
|
|||||||
import MarkdownIt from 'markdown-it'
|
import MarkdownIt from 'markdown-it'
|
||||||
import mdLinkAttributes from 'markdown-it-link-attributes'
|
import mdLinkAttributes from 'markdown-it-link-attributes'
|
||||||
|
|
||||||
// 初始化 markdown-it
|
// 版本历史可能来自插件市场或 Release 内容,禁止透传原始 HTML,避免外部内容注入脚本或事件属性。
|
||||||
const md = new MarkdownIt({
|
const md = new MarkdownIt({
|
||||||
html: true,
|
html: false,
|
||||||
linkify: true,
|
linkify: true,
|
||||||
typographer: true,
|
typographer: true,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user