jvoisin 1 год назад
Родитель
Сommit
2314500515
1 измененных файлов с 1 добавлено и 5 удалено
  1. 1 5
      internal/reader/sanitizer/sanitizer.go

+ 1 - 5
internal/reader/sanitizer/sanitizer.go

@@ -181,11 +181,7 @@ func sanitizeAttributes(baseURL, tagName string, attributes []html.Attribute) ([
 		}
 
 		if tagName == "img" && (attribute.Key == "width" || attribute.Key == "height") {
-			if !isPositiveInteger(value) {
-				continue
-			}
-
-			if isImageLargerThanLayout {
+			if isImageLargerThanLayout || !isPositiveInteger(value) {
 				continue
 			}
 		}