diff --git a/README.md b/README.md index df96ed7..61b2bf7 100644 --- a/README.md +++ b/README.md @@ -403,7 +403,7 @@ API 支持返回 Bilibili 标准 XML 格式的弹幕数据,通过查询参数 ```regex # EPISODE_TITLE_FILTER 默认值 -(特别|惊喜|纳凉)?企划(?!(书|案|部))|合伙人手记|超前(营业|vlog)?|速览|vlog|reaction|纯享|加更(版|篇)?|抢先(看|版|集|篇)?|(?': '>', + '"': '"', + "'": ''' + }; + return str.replace(/[&<>"']/g, m => map[m]); +} + // 页面加载完成后初始化 init(); diff --git a/danmu_api/ui/js/preview.js b/danmu_api/ui/js/preview.js index e87c06c..76b7713 100644 --- a/danmu_api/ui/js/preview.js +++ b/danmu_api/ui/js/preview.js @@ -37,11 +37,12 @@ function renderPreview() { if (items && items.length > 0) { html += \`

\${getCategoryName(category)}

\`; items.forEach(item => { + const escapedValue = escapeHtml(item.value); html += \`
\${item.key}
-
\${item.value}
+
\${escapedValue}
\${item.description ? \`
\${item.description}
\` : ''}
diff --git a/danmu_api/ui/js/systemsettings.js b/danmu_api/ui/js/systemsettings.js index 26968aa..2f128a1 100644 --- a/danmu_api/ui/js/systemsettings.js +++ b/danmu_api/ui/js/systemsettings.js @@ -1023,11 +1023,13 @@ function renderEnvList() { item.type === 'multi-select' ? '多选' : '文本'; const badgeClass = item.type === 'multi-select' ? 'multi' : ''; + const escapedValue = escapeHtml(item.value); + return \`
\${item.key}\${typeLabel} -
\${item.value}
+
\${escapedValue}
\${item.description || '无描述'}