0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

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) {