2
0

🐛 (settings) Allow meta tags in head element

This commit is contained in:
Baptiste Arnaud
2022-11-04 07:47:17 +01:00
parent c62e20f81a
commit ad9be92255
2 changed files with 12 additions and 1 deletions

View File

@@ -47,7 +47,12 @@ export const getServerSideProps: GetServerSideProps = async (
url: `https://${forwardedHost ?? host}${pathname}`,
customHeadCode:
isDefined(headCode) && headCode !== ''
? sanitizeHtml(headCode, { allowedTags: ['script', 'meta'] })
? sanitizeHtml(headCode, {
allowedTags: ['script', 'meta'],
allowedAttributes: {
meta: ['name', 'content'],
},
})
: null,
},
}