fix: move html escaping on credits page

This commit is contained in:
Ola Hneini 2022-03-15 15:23:13 +00:00 committed by Yassine Doghri
parent 90e44437bd
commit fbffdbde78
2 changed files with 13 additions and 14 deletions

View File

@ -65,10 +65,9 @@ class CreditsController extends BaseController
: $credit->podcast->link, : $credit->podcast->link,
'title' => $credit->episode_id 'title' => $credit->episode_id
? (count($allPodcasts) > 1 ? (count($allPodcasts) > 1
? "{$credit->podcast->title} " ? esc($credit->podcast->title) . ' '
: '') . : '') .
$credit->episode esc($credit->episode->title) .
->title .
episode_numbering( episode_numbering(
$credit->episode $credit->episode
->number, ->number,
@ -77,7 +76,7 @@ class CreditsController extends BaseController
'text-xs ml-2', 'text-xs ml-2',
true, true,
) )
: $credit->podcast->title, : esc($credit->podcast->title),
], ],
], ],
], ],
@ -103,9 +102,9 @@ class CreditsController extends BaseController
: $credit->podcast->link, : $credit->podcast->link,
'title' => $credit->episode_id 'title' => $credit->episode_id
? (count($allPodcasts) > 1 ? (count($allPodcasts) > 1
? "{$credit->podcast->title} " ? esc($credit->podcast->title) . ' '
: '') . : '') .
$credit->episode->title . esc($credit->episode->title) .
episode_numbering( episode_numbering(
$credit->episode->number, $credit->episode->number,
$credit->episode $credit->episode
@ -113,7 +112,7 @@ class CreditsController extends BaseController
'text-xs ml-2', 'text-xs ml-2',
true, true,
) )
: $credit->podcast->title, : esc($credit->podcast->title),
], ],
], ],
], ],
@ -132,16 +131,16 @@ class CreditsController extends BaseController
: $credit->podcast->link, : $credit->podcast->link,
'title' => $credit->episode_id 'title' => $credit->episode_id
? (count($allPodcasts) > 1 ? (count($allPodcasts) > 1
? "{$credit->podcast->title} " ? esc($credit->podcast->title) . ' '
: '') . : '') .
$credit->episode->title . esc($credit->episode->title) .
episode_numbering( episode_numbering(
$credit->episode->number, $credit->episode->number,
$credit->episode->season_number, $credit->episode->season_number,
'text-xs ml-2', 'text-xs ml-2',
true, true,
) )
: $credit->podcast->title, : esc($credit->podcast->title),
], ],
], ],
]; ];
@ -154,16 +153,16 @@ class CreditsController extends BaseController
: $credit->podcast->link, : $credit->podcast->link,
'title' => $credit->episode_id 'title' => $credit->episode_id
? (count($allPodcasts) > 1 ? (count($allPodcasts) > 1
? "{$credit->podcast->title} " ? esc($credit->podcast->title) . ' '
: '') . : '') .
$credit->episode->title . esc($credit->episode->title) .
episode_numbering( episode_numbering(
$credit->episode->number, $credit->episode->number,
$credit->episode->season_number, $credit->episode->season_number,
'text-xs ml-2', 'text-xs ml-2',
true, true,
) )
: $credit->podcast->title, : esc($credit->podcast->title),
]; ];
} }
} }

View File

@ -38,7 +38,7 @@
<?php foreach ($role['is_in'] as $in): ?> <?php foreach ($role['is_in'] as $in): ?>
<a href="<?= esc($in[ <a href="<?= esc($in[
'link' 'link'
]) ?>" class="text-sm text-skin-muted hover:underline"><?= esc($in['title']) ?></a> ]) ?>" class="text-sm text-skin-muted hover:underline"><?= $in['title'] ?></a>
<?php endforeach; ?> <?php endforeach; ?>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>