cap number of favicons to 50 per host

This commit is contained in:
Joe Lothan 2026-05-20 00:53:24 -04:00
parent cd896427eb
commit 03e343a136

View file

@ -47,7 +47,7 @@ func ParseHTML(body []byte, protocol, hostname string) ParseResult {
continue
}
if tagName == "link" && hasAttr {
if tagName == "link" && hasAttr && len(result.Icons) < 50 {
icon := parseLinkTag(tokenizer, protocol, hostname)
if icon != nil {
result.Icons = append(result.Icons, *icon)