1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-07-22 17:18:37 +00:00

feat(sanitizer): add validation for empty width and height attributes in img tags

This commit is contained in:
Frédéric Guillot 2025-06-09 20:34:41 -07:00
parent d53fd17e10
commit cecc18420d
2 changed files with 13 additions and 0 deletions

View file

@ -541,6 +541,9 @@ func isValidDataAttribute(value string) bool {
}
func isPositiveInteger(value string) bool {
if value == "" {
return false
}
if number, err := strconv.Atoi(value); err == nil {
return number > 0
}