Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a3453e3

Browse files
authored
fix(runtime-vapor): setting innerHTML should go through trusted types (#14000)
1 parent d1d35cb commit a3453e3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/runtime-vapor/src/dom

‎packages/runtime-vapor/src/dom/prop.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ export function setBlockHtml(
381381
block: Block & { $html?: string },
382382
value: any,
383383
): void {
384-
value = value == null ? '' : value
384+
value = value == null ? '' : unsafeToTrustedHTML(value)
385385
if (block.$html !== value) {
386386
setHtmlToBlock(block, (block.$html = value))
387387
}

0 commit comments

Comments
 (0)