summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp
diff options
context:
space:
mode:
authorTobias Christiansen <tobi@tobyase.de>2021-05-24 17:53:38 +0200
committerLinus Groh <mail@linusgroh.de>2021-05-24 17:45:09 +0100
commit9a1ac662f19fe4163e13881407e05a64fd4aed8f (patch)
tree123b7f772b7d37b36b7debd601c8173efc8984ff /Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp
parent708f8354771cc6a87082fbce06ff1f76ca6904cd (diff)
downloadserenity-9a1ac662f19fe4163e13881407e05a64fd4aed8f.zip
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.
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp')
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp
index 75cf9b4586..d17b0c63cf 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp
@@ -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));
}