diff --git a/src/Content/Text/HTML.php b/src/Content/Text/HTML.php
index c8bed0b9d..ddc587d72 100644
--- a/src/Content/Text/HTML.php
+++ b/src/Content/Text/HTML.php
@@ -419,6 +419,10 @@ class HTML
$link = $matches[0];
$url = $matches[1];
+ if (empty($url) || empty(parse_url($url))) {
+ return $matches[0];
+ }
+
$parts = array_merge($base, parse_url($url));
$url2 = Network::unparseURL($parts);