fix: add poster attribute to configuredXss (#5646)

This commit is contained in:
Truman Gao
2026-03-23 10:27:59 -07:00
committed by GitHub
parent a3eb981058
commit 67fd759d9b

View File

@@ -82,7 +82,7 @@ export const configuredXss = new FilterXSS({
safeAttrValue(tag, name, value, cssFilter) {
if (
(tag === 'img' || tag === 'video' || tag === 'audio' || tag === 'source') &&
(name === 'src' || name === 'srcset') &&
(name === 'src' || name === 'srcset' || name === 'poster') &&
!value.startsWith('data:')
) {
try {