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:
parent
d53fd17e10
commit
cecc18420d
2 changed files with 13 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue