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 0be6d24 commit a4caca8Copy full SHA for a4caca8
Embed/Providers/Html.php
@@ -135,12 +135,18 @@ public function __construct(Request $request)
135
if ($img->hasAttribute('src')) {
136
$src = new Url($img->getAttribute('src'));
137
138
- //Check whether the image is in the same domain
139
- if ($src->getDomain() && $src->getDomain() !== $domain) {
+ //Is src relative?
+ if (!$src->getDomain()) {
140
+ $images[] = $src->getUrl();
141
continue;
142
}
143
- //Check whether the image is inside an external link
144
+ //Avoid external images
145
+ if ($src->getDomain() !== $domain) {
146
+ continue;
147
+ }
148
+
149
+ //Avoid images in external links
150
$parent = $img->parentNode;
151
152
while ($parent && isset($parent->tagName)) {
0 commit comments