From 1c4a50442bea2d3449efce9c5ff1c80743152f55 Mon Sep 17 00:00:00 2001 From: Yassine Doghri <yassine@doghri.fr> Date: Thu, 8 Oct 2020 18:06:30 +0000 Subject: [PATCH] feat: set podcast / episode description in the pages description meta tag strip html tags from description_html attributes to generate text only description closes #44 --- app/Views/episode.php | 4 +++- app/Views/podcast.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Views/episode.php b/app/Views/episode.php index 40076e1787..c9a8a4afd1 100644 --- a/app/Views/episode.php +++ b/app/Views/episode.php @@ -5,7 +5,9 @@ <head> <meta charset="UTF-8"/> <title><?= $episode->title ?></title> - <meta name="description" content="Castopod is an open-source hosting platform made for podcasters who want engage and interact with their audience."/> + <meta name="description" content="<?= strip_tags( + $episode->description_html + ) ?>"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <link rel="shortcut icon" type="image/png" href="/favicon.ico" /> <link rel="stylesheet" href="/assets/index.css"/> diff --git a/app/Views/podcast.php b/app/Views/podcast.php index 586f11e1f4..5e271c58fd 100644 --- a/app/Views/podcast.php +++ b/app/Views/podcast.php @@ -6,7 +6,9 @@ <head> <meta charset="UTF-8"/> <title><?= $podcast->title ?></title> - <meta name="description" content="Castopod is an open-source hosting platform made for podcasters who want engage and interact with their audience."/> + <meta name="description" content="<?= strip_tags( + $podcast->description_html + ) ?>"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <link rel="shortcut icon" type="image/png" href="/favicon.ico" /> <link rel="stylesheet" href="/assets/index.css"/> -- GitLab