mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
Include OpenGraph prefix material in <html> tag if OpenGraph is enabled
Summary: Ref T13018. Discourse doesn't seem to be picking this up yet (see <https://discourse.phabricator-community.org/t/opengraph-test-topic/762>) so maybe it really needs this meta-meta-XML stuff? Test Plan: Will push. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13018 Differential Revision: https://secure.phabricator.com/D18781
This commit is contained in:
parent
2c72c2b924
commit
c3d6c4b0ee
4 changed files with 10 additions and 2 deletions
|
@ -292,6 +292,7 @@ return array(
|
|||
'rsrc/favicons/mstile-310x150.png' => '4a49d3ee',
|
||||
'rsrc/favicons/mstile-310x310.png' => 'a52ab264',
|
||||
'rsrc/favicons/mstile-70x70.png' => '5edce7b8',
|
||||
'rsrc/favicons/opengraph-144x144.png' => '648fb0fc',
|
||||
'rsrc/image/BFCFDA.png' => 'd5ec91f4',
|
||||
'rsrc/image/actions/edit.png' => '2fc41442',
|
||||
'rsrc/image/avatar.png' => '17d346a4',
|
||||
|
|
|
@ -59,9 +59,15 @@ abstract class AphrontPageView extends AphrontView {
|
|||
),
|
||||
array($body, $tail));
|
||||
|
||||
if (PhabricatorEnv::getEnvConfig('policy.allow-public')) {
|
||||
$html_open_tag = hsprintf('<html prefix="og: http://ogp.me/ns#">');
|
||||
} else {
|
||||
$html_open_tag = hsprintf('<html>');
|
||||
}
|
||||
|
||||
$response = hsprintf(
|
||||
'<!DOCTYPE html>'.
|
||||
'<html>'.
|
||||
'%s'.
|
||||
'<head>'.
|
||||
'<meta charset="UTF-8" />'.
|
||||
'<title>%s</title>'.
|
||||
|
@ -69,6 +75,7 @@ abstract class AphrontPageView extends AphrontView {
|
|||
'</head>'.
|
||||
'%s'.
|
||||
'</html>',
|
||||
$html_open_tag,
|
||||
$title,
|
||||
$head,
|
||||
$body);
|
||||
|
|
|
@ -936,7 +936,7 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView
|
|||
),
|
||||
array(
|
||||
'og:image',
|
||||
PhabricatorCustomLogoConfigType::getLogoURI($viewer),
|
||||
celerity_get_resource_uri('rsrc/favicons/opengraph-144x144.png'),
|
||||
),
|
||||
);
|
||||
|
||||
|
|
BIN
webroot/rsrc/favicons/opengraph-144x144.png
Normal file
BIN
webroot/rsrc/favicons/opengraph-144x144.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
Loading…
Reference in a new issue