Add GitHub Pages content in Markdown support (#5522)

* add `allowedHostnameSuffixes` with `.github.io` support

* apply `prettier`

---------

Co-authored-by: Prospector <6166773+Prospector@users.noreply.github.com>
This commit is contained in:
Lime
2026-03-17 23:07:25 +03:00
committed by GitHub
parent 87c86c7d0d
commit c556624d0e

View File

@@ -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,