Fix HTMLElement expression warning (#2675)

This commit is contained in:
Jonathan Neal 2022-02-28 15:03:22 -05:00 committed by GitHub
parent 04ea9a4aa4
commit bfaff255f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -495,7 +495,7 @@ export async function renderHTMLElement(result: SSRResult, constructor: typeof H
attrHTML += ` ${attr}="${toAttributeString(await props[attr])}"`;
}
return `<${name}${attrHTML}>${await renderSlot(result, slots?.default)}</${name}>`;
return unescapeHTML(`<${name}${attrHTML}>${await renderSlot(result, slots?.default)}</${name}>`);
}
function getHTMLElementName(constructor: typeof HTMLElement) {