summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/Collaboration/Reference/LinkReferenceProvider.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/Collaboration/Reference/LinkReferenceProvider.php b/lib/private/Collaboration/Reference/LinkReferenceProvider.php
index 2cdfb2e0c91..2a6d4d5afaf 100644
--- a/lib/private/Collaboration/Reference/LinkReferenceProvider.php
+++ b/lib/private/Collaboration/Reference/LinkReferenceProvider.php
@@ -117,8 +117,10 @@ class LinkReferenceProvider implements IReferenceProvider {
}
$linkContentType = $headResponse->getHeader('Content-Type');
$expectedContentType = 'text/html';
+ $suffixedExpectedContentType = $expectedContentType . ';';
+ $startsWithSuffixed = substr($linkContentType, 0, strlen($suffixedExpectedContentType)) === $suffixedExpectedContentType;
// check the header begins with the expected content type
- if (substr($linkContentType, 0, strlen($expectedContentType)) !== $expectedContentType) {
+ if ($linkContentType !== $expectedContentType && !$startsWithSuffixed) {
$this->logger->debug('Skip resolving links pointing to content type that is not "text/html"');
return;
}