From b7abead1073daa2a043892909f9fff05885dc04f Mon Sep 17 00:00:00 2001 From: joshuaruesweg Date: Tue, 16 Mar 2021 16:07:49 +0100 Subject: [PATCH] Add `og:image:url` detection --- .../lib/system/message/unfurl/UnfurlResponse.class.php | 7 +++++++ 1 file changed, 7 insertions(+) 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; -- 2.20.1