$attachment = $this->getAttachment($attachmentID);
if ($attachment === null) {
- return WCF::getTPL()->fetch('shared_contentNotVisible');
+ return WCF::getTPL()->fetch('shared_contentNotVisible', sandbox: true);
}
$outputType = $parser->getOutputType();
return WCF::getTPL()->fetch('shared_bbcode_attach_video', 'wcf', [
'attachment' => $attachment,
'attachmentIdentifier' => StringUtil::getRandomID(),
- ]);
+ ], true);
}
private function showAudioPlayer(Attachment $attachment): string
return WCF::getTPL()->fetch('shared_bbcode_attach_audio', 'wcf', [
'attachment' => $attachment,
'attachmentIdentifier' => StringUtil::getRandomID(),
- ]);
+ ], true);
}
private function getAttachment(int $attachmentID): ?Attachment
$article = $this->getArticle($articleID);
if ($article === null) {
- return WCF::getTPL()->fetch('shared_contentNotVisible');
+ return WCF::getTPL()->fetch('shared_contentNotVisible', sandbox: true);
}
if (!$article->canRead()) {
/** @var ViewableMedia $media */
$media = MessageEmbeddedObjectManager::getInstance()->getObject('com.woltlab.wcf.media', $mediaID);
if ($media === null) {
- return WCF::getTPL()->fetch('shared_contentNotVisible');
+ return WCF::getTPL()->fetch('shared_contentNotVisible', sandbox: true);
}
if ($media->isAccessible()) {
'media' => $media->getLocalizedVersion(MessageEmbeddedObjectManager::getInstance()->getActiveMessageLanguageID()),
'thumbnailSize' => $thumbnailSize,
'width' => $width,
- ]);
+ ], true);
} elseif ($media->isVideo() || $media->isAudio()) {
return WCF::getTPL()->fetch('shared_bbcode_wsm', 'wcf', [
'mediaLink' => $media->getLink(),
'float' => $float,
'media' => $media->getLocalizedVersion(MessageEmbeddedObjectManager::getInstance()->getActiveMessageLanguageID()),
'width' => 'auto',
- ]);
+ ], true);
}
return StringUtil::getAnchorTag($media->getLink(), $media->getTitle());
return StringUtil::getAnchorTag($page->getLink(), $title ?: $page->getTitle());
}
- return WCF::getTPL()->fetch('shared_contentNotVisible');
+ return WCF::getTPL()->fetch('shared_contentNotVisible', sandbox: true);
}
}