diff options
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/note.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/templates/note.php b/templates/note.php index db4fbb9..b5b07df 100644 --- a/templates/note.php +++ b/templates/note.php @@ -24,9 +24,10 @@ if ($user != null) { <div class="infoLine"> <a class="authorName" - href="/@/<?= $note->author->getFullHandle() ?>"><?= htmlspecialchars($note->author->displayName) ?></a> - <span class="authorHandle">@<?= $note->author->getFullHandle() ?></span> - <a class="timestamp" href="/@/<?= $note->author->getFullHandle() ?>/note/<?= $note->id ?>"> + href="/@/<?= htmlspecialchars($note->author->getFullHandle()) ?>"><?= htmlspecialchars($note->author->displayName) ?></a> + <span class="authorHandle">@<?= htmlspecialchars($note->author->getFullHandle()) ?></span> + <a class="timestamp" + href="/@/<?= htmlspecialchars($note->author->getFullHandle()) ?>/note/<?= $note->id ?>"> <?= format_datetime($note->created, $prefs?->get('locale.timezone')) . (isset($note->modified) && $note->modified != $note->created ? ' (' . format_datetime($note->modified, $prefs?->get('locale.timezone')) . ')' @@ -49,7 +50,8 @@ if ($user != null) { <?php if (isset($note->inReplyTo)): ?> <div class="replyInfo"> <span class="material-symbols reply inlineIcon"></span> - <a href="/@/<?= $note->inReplyTo->author->getFullHandle() ?>/note/<?= $note->inReplyTo->id ?>"> + <a + href="/@/<?= htmlspecialchars($note->inReplyTo->author->getFullHandle()) ?>/note/<?= $note->inReplyTo->id ?>"> <?= sprintf(__('note.info.replyTo'), '<b>' . htmlspecialchars($note->inReplyTo->author->displayName)) . '</b>' ?> </a> @@ -59,7 +61,7 @@ if ($user != null) { <span class="material-symbols alternate-email inlineIcon"></span> <span> <?= sprintf(__('note.info.mentions'), implode(', ', array_map( - fn(Actor $m) => '<b><a href="/@/' . $m->getFullHandle() . '">' . $m->displayName . '</a></b>', + fn(Actor $m) => '<b><a href="/@/' . htmlspecialchars($m->getFullHandle()) . '">' . htmlspecialchars($m->displayName) . '</a></b>', $note->mentions ))) ?> </span> @@ -71,7 +73,7 @@ if ($user != null) { <summary><?= htmlspecialchars($note->summary) ?></summary> <?php endif; ?> <div class="content"> - <?= $note->getFormattedContent('text/html') ?? htmlspecialchars($note->plainContent) ?> + <?= $note->getBestContentAsHtml() ?> </div> <?php if (count($note->attachments) > 0): ?> |
