Skip to content

Commit 8e052ad

Browse files
committed
Fix markdown images
1 parent 3b8963f commit 8e052ad

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/utils/parse.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ export const configuredXss = new FilterXSS({
7777
}
7878
},
7979
safeAttrValue(tag, name, value, cssFilter) {
80-
if (tag === 'img' && name === 'src' && !value.startsWith('data:')) {
80+
if (
81+
(tag === 'img' || tag === 'video' || tag === 'audio' || tag === 'source') &&
82+
(name === 'src' || name === 'srcset') &&
83+
!value.startsWith('data:')
84+
) {
8185
try {
8286
const url = new URL(value)
8387

0 commit comments

Comments
 (0)