Skip to content

Commit 7dfb22d

Browse files
in the link reference provider, check if the link content type begins with text/html
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
1 parent a398872 commit 7dfb22d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/private/Collaboration/Reference/LinkReferenceProvider.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ private function fetchReference(Reference $reference): void {
116116
return;
117117
}
118118
$linkContentType = $headResponse->getHeader('Content-Type');
119-
if ($linkContentType !== 'text/html') {
119+
$expectedContentType = 'text/html';
120+
// check the header begins with the expected content type
121+
if (substr($linkContentType, 0, strlen($expectedContentType)) !== $expectedContentType) {
120122
$this->logger->debug('Skip resolving links pointing to content type that is not "text/html"');
121123
return;
122124
}

0 commit comments

Comments
 (0)