We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5342e6 commit 62a90e2Copy full SHA for 62a90e2
Embed/Providers/Html.php
@@ -128,14 +128,12 @@ public function __construct(Url $Url)
128
129
foreach ($Content->getElementsByTagName('img') as $Tag) {
130
if ($Tag->hasAttribute('src')) {
131
- $image = $Tag->getAttribute('src');
+ $image = new Url($Tag->getAttribute('src'));
132
133
//Check whether the image is in the same domain
134
- if ((strpos($image, '//') === false) || (($ImgUrl = new Url($image)) && ($ImgUrl->getDomain() !== $domain))) {
135
- continue;
+ if (!$image->getDomain() || $image->getDomain() === $domain) {
+ $images[] = $image->getUrl();
136
}
137
-
138
- $images[] = $image;
139
140
141
0 commit comments