Sanitize output by applying htmlspecialchars to site titles, slogans, and social network labels across multiple templates

This commit is contained in:
interlope committed 2026-06-01 21:02:27 +02:00
1 parent 8c433a3418
commit 7f2ed60a89
4 files changed
+20 -20

No files matched your search

+3 -3
View File
@@ -8,11 +8,11 @@
<?php if ($isArticle) : ?>
<div class="sidebar-profile text-center">
<a href="<?php echo Theme::siteUrl() ?>">
<img class="sidebar-profile-avatar" src="<?php echo DOMAIN_THEME . 'img/spleenftw.jpeg' ?>" alt="<?php echo $site->title() ?>" />
<img class="sidebar-profile-avatar" src="<?php echo DOMAIN_THEME . 'img/spleenftw.jpeg' ?>" alt="<?php echo htmlspecialchars($site->title(), ENT_QUOTES, 'UTF-8') ?>" />
</a>
<div class="sidebar-profile-name"><?php echo $site->title() ?></div>
<div class="sidebar-profile-name"><?php echo htmlspecialchars($site->title(), ENT_QUOTES, 'UTF-8') ?></div>
<?php if ($site->slogan()) : ?>
<p class="sidebar-profile-bio"><?php echo $site->slogan() ?></p>
<p class="sidebar-profile-bio"><?php echo htmlspecialchars($site->slogan(), ENT_QUOTES, 'UTF-8') ?></p>
<?php endif ?>
</div>
<?php endif ?>