From: joshuaruesweg Date: Tue, 16 Mar 2021 15:07:49 +0000 (+0100) Subject: Add `og:image:url` detection X-Git-Tag: 5.4.0_Alpha_1~146^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b7abead1073daa2a043892909f9fff05885dc04f;p=GitHub%2FWoltLab%2FWCF.git Add `og:image:url` detection --- diff --git a/wcfsetup/install/files/lib/system/message/unfurl/UnfurlResponse.class.php b/wcfsetup/install/files/lib/system/message/unfurl/UnfurlResponse.class.php index 42f369b989..85f4102158 100644 --- a/wcfsetup/install/files/lib/system/message/unfurl/UnfurlResponse.class.php +++ b/wcfsetup/install/files/lib/system/message/unfurl/UnfurlResponse.class.php @@ -254,6 +254,13 @@ final class UnfurlResponse /** @var \DOMElement $node */ return $node->getAttribute("content"); } + + // og:image:url + $list = $this->domXPath->query("//meta[@property='og:image:url']"); + foreach ($list as $node) { + /** @var \DOMElement $node */ + return $node->getAttribute("content"); + } } return null;