diff --git a/packages/utils/parse.ts b/packages/utils/parse.ts index d981d07b27..646caa5ae7 100644 --- a/packages/utils/parse.ts +++ b/packages/utils/parse.ts @@ -109,7 +109,12 @@ export const configuredXss = new FilterXSS({ 'bstats.org', ] - if (!allowedHostnames.includes(url.hostname)) { + const allowedHostnameSuffixes = ['.github.io'] + + if ( + !allowedHostnames.includes(url.hostname) && + !allowedHostnameSuffixes.some((suffix) => url.hostname.endsWith(suffix)) + ) { return safeAttrValue( tag, name,