diff --git a/web/src/engine/renderMarkdown.test.ts b/web/src/engine/renderMarkdown.test.ts
index e5e89e25..267029d2 100644
--- a/web/src/engine/renderMarkdown.test.ts
+++ b/web/src/engine/renderMarkdown.test.ts
@@ -3,14 +3,33 @@ import assert from 'node:assert/strict';
import { renderInlineMarkdown } from './renderMarkdown';
import { sanitizeMermaidCode } from '../components/doc/blocks/MermaidBlockView';
-test('renderInlineMarkdown: renders bold, italic, strikethrough, underline', () => {
- const input = '**粗体指标** *斜体说明* ~~废弃版本~~ 重要条款';
+test('renderInlineMarkdown: renders bold, italic, strikethrough', () => {
+ const input = '**粗体指标** *斜体说明* ~~废弃版本~~';
const html = renderInlineMarkdown(input);
assert.ok(html.includes('粗体指标'));
assert.ok(html.includes('斜体说明'));
assert.ok(html.includes('废弃版本'));
- assert.ok(html.includes('重要条款'));
+});
+
+test('renderInlineMarkdown: escapes raw HTML tags to prevent XSS', () => {
+ const scriptHtml = renderInlineMarkdown('');
+ assert.ok(!scriptHtml.includes('