You've already forked AstralRinth
@@ -68,6 +68,10 @@ export const configuredXss = new xss.FilterXSS({
|
||||
try {
|
||||
const url = new URL(value)
|
||||
|
||||
if (url.hostname.includes('wsrv.nl')) {
|
||||
url.searchParams.delete('errorredirect')
|
||||
}
|
||||
|
||||
const allowedHostnames = [
|
||||
'imgur.com',
|
||||
'i.imgur.com',
|
||||
@@ -88,9 +92,11 @@ export const configuredXss = new xss.FilterXSS({
|
||||
return xss.safeAttrValue(
|
||||
tag,
|
||||
name,
|
||||
`https://wsrv.nl/?url=${encodeURIComponent(value)}&n=-1`,
|
||||
`https://wsrv.nl/?url=${encodeURIComponent(url.toString())}&n=-1`,
|
||||
cssFilter
|
||||
)
|
||||
} else {
|
||||
return xss.safeAttrValue(tag, name, url.toString(), cssFilter)
|
||||
}
|
||||
} catch (err) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user