diff options
-rw-r--r-- | lib/private/Collaboration/Reference/LinkReferenceProvider.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/Collaboration/Reference/LinkReferenceProvider.php b/lib/private/Collaboration/Reference/LinkReferenceProvider.php index 583cbdcfe99..2cdfb2e0c91 100644 --- a/lib/private/Collaboration/Reference/LinkReferenceProvider.php +++ b/lib/private/Collaboration/Reference/LinkReferenceProvider.php @@ -116,7 +116,9 @@ class LinkReferenceProvider implements IReferenceProvider { 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; } |