Skip to content

Commit a6636bd

Browse files
committed
Do not override a non-HTTP resource link with the base URL
1 parent abef291 commit a6636bd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Model/Resource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ protected function makeAbsoluteUrl($relativeUrl, $baseUrl = null)
612612
$base = Url::fromString($baseUrl);
613613
$target = Url::fromString($relativeUrl);
614614
// Ensure an absolute base URL overrides an absolute target URL.
615-
if ($base->isAbsolute()) {
615+
if ($base->isAbsolute() && \in_array($target->getScheme(), ['http', 'https'])) {
616616
return (string) $base->combine($target->getPath());
617617
}
618618
return (string) $base->combine($target);

0 commit comments

Comments
 (0)