summaryrefslogtreecommitdiff
path: root/plugins/share/init.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/share/init.php')
-rw-r--r--plugins/share/init.php30
1 files changed, 17 insertions, 13 deletions
diff --git a/plugins/share/init.php b/plugins/share/init.php
index 64a9054eb..195f9df2a 100644
--- a/plugins/share/init.php
+++ b/plugins/share/init.php
@@ -149,6 +149,9 @@ class Share extends Plugin {
$line['content'] = DiskCache::rewrite_urls($line['content']);
+ if (!$og_image)
+ $og_image = Config::get_self_url() . "/images/favicon-512px.png";
+
ob_start();
?>
@@ -180,27 +183,28 @@ class Share extends Plugin {
strip_tags($content_decoded)
)
), 500, "...")) ?>">
- </head>
- <?php if ($og_image) { ?>
- <meta property='og:image' content="<?= htmlspecialchars($og_image) ?>">
- <?php } ?>
+ <?php if ($og_image) { ?>
+ <meta property='og:image' content="<?= htmlspecialchars($og_image) ?>">
+ <?php } ?>
+ </head>
<body class='flat ttrss_utility ttrss_zoom css_loading'>
<div class='container'>
- <?php if (!empty($line["link"])) { ?>
- <h1>
- <a target='_blank' rel='noopener noreferrer'
- href="<?= htmlspecialchars($line["link"]) ?>"><?= htmlspecialchars($line["title"]) ?></a>
- </h1>
- <?php } else { ?>
- <h1><?= $line["title"] ?></h1>
- <?php } ?>
-
<div class='content post'>
<div class='header'>
<div class='row'>
+ <?php if (!empty($line["link"])) { ?>
+ <h1>
+ <a rel='noopener noreferrer'
+ href="<?= htmlspecialchars($line["link"]) ?>"><?= htmlspecialchars($line["title"]) ?></a>
+ </h1>
+ <?php } else { ?>
+ <h1><?= $line["title"] ?></h1>
+ <?php } ?>
+ </div>
+ <div class='row'>
<div><?= $line['author'] ?></div>
<div><?= $parsed_updated ?></div>
</div>