From 45ac20c7a4d632bbb23aaba50c2d79ac5ebac465 Mon Sep 17 00:00:00 2001 From: winter Date: Fri, 14 Feb 2025 17:56:45 +0000 Subject: implement formatted note contents (html and commonmark) --- templates/note.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'templates') 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) {
author->displayName) ?> - @author->getFullHandle() ?> - + href="/@/author->getFullHandle()) ?>">author->displayName) ?> + @author->getFullHandle()) ?> + 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) { inReplyTo)): ?>
- + ' . htmlspecialchars($note->inReplyTo->author->displayName)) . '' ?> @@ -59,7 +61,7 @@ if ($user != null) { '' . $m->displayName . '', + fn(Actor $m) => '' . htmlspecialchars($m->displayName) . '', $note->mentions ))) ?> @@ -71,7 +73,7 @@ if ($user != null) { summary) ?>
- getFormattedContent('text/html') ?? htmlspecialchars($note->plainContent) ?> + getBestContentAsHtml() ?>
attachments) > 0): ?> -- cgit v1.3