]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(runtime-vapor): setting innerHTML should go through trusted types (#14000)
authoredison <daiwei521@126.com>
Tue, 21 Oct 2025 00:31:35 +0000 (08:31 +0800)
committerGitHub <noreply@github.com>
Tue, 21 Oct 2025 00:31:35 +0000 (08:31 +0800)
packages/runtime-vapor/src/dom/prop.ts

index 9cd0f2149148188f0d33b72a8674d4365c184c0d..b104b20900d7687c46b7d654954e33273f7eedc7 100644 (file)
@@ -381,7 +381,7 @@ export function setBlockHtml(
   block: Block & { $html?: string },
   value: any,
 ): void {
-  value = value == null ? '' : value
+  value = value == null ? '' : unsafeToTrustedHTML(value)
   if (block.$html !== value) {
     setHtmlToBlock(block, (block.$html = value))
   }