Fix markdown images (#2452)
This commit is contained in:
parent
3b8963fad0
commit
2713f0e610
@ -77,7 +77,11 @@ export const configuredXss = new FilterXSS({
|
||||
}
|
||||
},
|
||||
safeAttrValue(tag, name, value, cssFilter) {
|
||||
if (tag === 'img' && name === 'src' && !value.startsWith('data:')) {
|
||||
if (
|
||||
(tag === 'img' || tag === 'video' || tag === 'audio' || tag === 'source') &&
|
||||
(name === 'src' || name === 'srcset') &&
|
||||
!value.startsWith('data:')
|
||||
) {
|
||||
try {
|
||||
const url = new URL(value)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user