parse markdown
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
// Inclure la configuration
|
||||
require_once 'includes/config.php';
|
||||
// Inclure le convertisseur Markdown
|
||||
require_once 'includes/lib/markdown.php';
|
||||
|
||||
// Récupérer l'ID de la vidéo depuis l'URL
|
||||
$videoId = isset($_GET['id']) ? $_GET['id'] : '';
|
||||
@@ -266,21 +268,21 @@ if (empty($videoData) || isset($videoData['error'])) {
|
||||
if ($hasTruncatedDesc):
|
||||
?>
|
||||
<div class="truncated-description">
|
||||
<?php echo nl2br(htmlspecialchars($video['truncatedDescription'])); ?>
|
||||
<?php echo markdown_to_html($video['truncatedDescription']); ?>
|
||||
<button class="show-more-btn">
|
||||
<span>Voir plus</span>
|
||||
<i class="fas fa-chevron-down"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="full-description" style="display: none;">
|
||||
<?php echo nl2br(htmlspecialchars($video['description'])); ?>
|
||||
<?php echo markdown_to_html($video['description']); ?>
|
||||
<button class="show-less-btn">
|
||||
<span>Voir moins</span>
|
||||
<i class="fas fa-chevron-up"></i>
|
||||
</button>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<?php echo nl2br(htmlspecialchars($video['description'])); ?>
|
||||
<?php echo markdown_to_html($video['description']); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user