Fix GIFs (#1130)
This commit is contained in:
parent
732f88ff51
commit
82b96d1a14
@ -14,16 +14,11 @@ export const configuredXss = new xss.FilterXSS({
|
||||
kbd: ['id'],
|
||||
input: ['checked', 'disabled', 'type'],
|
||||
iframe: ['width', 'height', 'allowfullscreen', 'frameborder', 'start', 'end'],
|
||||
img: [...xss.whiteList.img, 'style', 'usemap'],
|
||||
img: [...xss.whiteList.img, 'usemap'],
|
||||
map: ['name'],
|
||||
area: [...xss.whiteList.a, 'coords'],
|
||||
a: [...xss.whiteList.a, 'rel'],
|
||||
},
|
||||
css: {
|
||||
whiteList: {
|
||||
'image-rendering': /^pixelated$/,
|
||||
},
|
||||
},
|
||||
onIgnoreTagAttr: (tag, name, value) => {
|
||||
// Allow iframes from acceptable sources
|
||||
if (tag === 'iframe' && name === 'src') {
|
||||
@ -80,7 +75,7 @@ export const configuredXss = new xss.FilterXSS({
|
||||
]
|
||||
|
||||
if (!allowedHostnames.includes(url.hostname)) {
|
||||
return `https://wsrv.nl/?url=${encodeURIComponent(value)}`
|
||||
return `https://wsrv.nl/?url=${encodeURIComponent(value)}&n=-1`
|
||||
}
|
||||
} catch (err) {}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user