mirror of
https://github.com/miniflux/v2.git
synced 2025-07-22 17:18:37 +00:00
feat(sanitizer): allow img
tags with only a srcset
and no src
attribute
This commit is contained in:
parent
991c54150d
commit
462ba8d7f7
2 changed files with 13 additions and 3 deletions
|
@ -296,9 +296,9 @@ func hasRequiredAttributes(tagName string, attributes []string) bool {
|
|||
switch tagName {
|
||||
case "a":
|
||||
return slices.Contains(attributes, "href")
|
||||
case "iframe", "img":
|
||||
case "iframe":
|
||||
return slices.Contains(attributes, "src")
|
||||
case "source":
|
||||
case "source", "img":
|
||||
return slices.Contains(attributes, "src") || slices.Contains(attributes, "srcset")
|
||||
default:
|
||||
return true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue