LibWeb: Don't try to load anything if src is empty in <img>

Previously we tried to load "" if the src was present but empty and
essentially only waited for RequestServer to time out.
This commit is contained in:
Tobias Christiansen 2021-05-24 17:53:38 +02:00 committed by Linus Groh
parent 708f835477
commit 9a1ac662f1
Notes: sideshowbarker 2024-07-18 17:27:50 +09:00

View file

@ -60,7 +60,7 @@ void HTMLImageElement::parse_attribute(const FlyString& name, const String& valu
{
HTMLElement::parse_attribute(name, value);
if (name == HTML::AttributeNames::src)
if (name == HTML::AttributeNames::src && !value.is_empty())
m_image_loader.load(document().complete_url(value));
}