From 08e5e0f1575a8a42c162908124153429332f390f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0?= Date: Tue, 28 Oct 2025 16:33:12 +0900 Subject: [PATCH 1/2] docs: clarify the values are escaped automatically (#21017) --- guide/api-plugin.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/guide/api-plugin.md b/guide/api-plugin.md index a35fc0d2..d6f79703 100644 --- a/guide/api-plugin.md +++ b/guide/api-plugin.md @@ -387,6 +387,9 @@ Vite plugins can also provide hooks that serve Vite-specific purposes. These hoo interface HtmlTagDescriptor { tag: string + /** + * attribute values will be escaped automatically if needed + */ attrs?: Record children?: string | HtmlTagDescriptor[] /** From 19ad85aa73195b24ffe07b02b132ee167bed99e9 Mon Sep 17 00:00:00 2001 From: thinkasany <480968828@qq.com> Date: Wed, 29 Oct 2025 08:14:12 +0800 Subject: [PATCH 2/2] resolved conflict --- guide/api-plugin.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/guide/api-plugin.md b/guide/api-plugin.md index 445462f0..b3e84930 100644 --- a/guide/api-plugin.md +++ b/guide/api-plugin.md @@ -387,14 +387,10 @@ Vite 插件也可以提供钩子来服务于特定的 Vite 目标。这些钩子 interface HtmlTagDescriptor { tag: string -<<<<<<< HEAD - attrs?: Record -======= /** - * attribute values will be escaped automatically if needed + * 如果需要,属性值将自动转义。 */ attrs?: Record ->>>>>>> 08e5e0f1575a8a42c162908124153429332f390f children?: string | HtmlTagDescriptor[] /** * 默认: 'head-prepend'