diff --git a/lib/private/Collaboration/Reference/LinkReferenceProvider.php b/lib/private/Collaboration/Reference/LinkReferenceProvider.php index 583cbdcfe9977..2cdfb2e0c9159 100644 --- a/lib/private/Collaboration/Reference/LinkReferenceProvider.php +++ b/lib/private/Collaboration/Reference/LinkReferenceProvider.php @@ -116,7 +116,9 @@ private function fetchReference(Reference $reference): void { return; } $linkContentType = $headResponse->getHeader('Content-Type'); - if ($linkContentType !== 'text/html') { + $expectedContentType = 'text/html'; + // check the header begins with the expected content type + if (substr($linkContentType, 0, strlen($expectedContentType)) !== $expectedContentType) { $this->logger->debug('Skip resolving links pointing to content type that is not "text/html"'); return; }