From fcc562cfa08218c60286e25816fe990d8fa62f46 Mon Sep 17 00:00:00 2001 From: Luffy <52o@qq52o.cn> Date: Fri, 17 Oct 2025 10:56:31 +0800 Subject: [PATCH] fix: sanitize title by removing HTML tags from config name --- src/core/event/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/event/index.js b/src/core/event/index.js index 12fa3c78c..9ec8d6778 100644 --- a/src/core/event/index.js +++ b/src/core/event/index.js @@ -313,11 +313,13 @@ export function Events(Base) { * @void */ onRender() { - const { name } = this.config; const currentPath = this.router.toURL(this.router.getCurrentPath()); const currentSection = dom .find(`.sidebar a[href='${currentPath}']`) ?.getAttribute('title'); + let { name } = this.config; + + name = name ? name.replace(/<[^>]+>/g, '') : name; const currentTitle = name ? currentSection