From 2d49ff9fb4ea9b0e88df1621e954246bc1851de6 Mon Sep 17 00:00:00 2001 From: r Date: Wed, 30 Mar 2022 15:52:30 +0000 Subject: Switch to html/template --- templates/status.tmpl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'templates/status.tmpl') diff --git a/templates/status.tmpl b/templates/status.tmpl index dda1d79..fd0940f 100644 --- a/templates/status.tmpl +++ b/templates/status.tmpl @@ -5,7 +5,7 @@ avatar - {{EmojiFilter (html .Account.DisplayName) .Account.Emojis}} + {{EmojiFilter (HTML .Account.DisplayName) .Account.Emojis | Raw}} @{{.Account.Acct}} @@ -23,7 +23,7 @@
- {{EmojiFilter (html .Account.DisplayName) .Account.Emojis}} + {{EmojiFilter (HTML .Account.DisplayName) .Account.Emojis | Raw}} @{{.Account.Acct}} @@ -91,7 +91,10 @@ {{end}}
{{if (or .Content .SpoilerText)}} -
{{StatusContentFilter (html .SpoilerText) .Content .Emojis .Mentions}}
+
+ {{if .SpoilerText}}{{EmojiFilter (HTML .SpoilerText) .Emojis | Raw}}
{{end}} + {{StatusContentFilter .Content .Emojis .Mentions | Raw}} +
{{end}} {{if .MediaAttachments}}
@@ -156,12 +159,12 @@ {{range $i, $o := .Poll.Options}}
{{if (or $s.Poll.Expired $s.Poll.Voted)}} -
{{EmojiFilter (html $o.Title) $s.Emojis}} - {{$o.VotesCount}} votes
+
{{EmojiFilter (HTML $o.Title) $s.Emojis | Raw}} - {{$o.VotesCount}} votes
{{else}} {{end}}
-- cgit v1.2.3 From 94ff5c93ded09cf6d9cff3e18969df3e9c6cb186 Mon Sep 17 00:00:00 2001 From: r Date: Wed, 30 Mar 2022 17:59:42 +0000 Subject: Show attachment metadata when attachment preview is disabled --- templates/status.tmpl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'templates/status.tmpl') diff --git a/templates/status.tmpl b/templates/status.tmpl index fd0940f..5ada84e 100644 --- a/templates/status.tmpl +++ b/templates/status.tmpl @@ -103,7 +103,7 @@ {{if eq .Type "image"}} {{if $.Ctx.HideAttachments}} - {{if .Description}}[{{.Description}}]{{else}}[image]{{end}} + [image{{if $s.Sensitive}}/nsfw{{end}}{{if .Description}}: {{.Description}}{{end}}] {{else}} @@ -117,7 +117,7 @@ {{else if eq .Type "audio"}} {{if $.Ctx.HideAttachments}} - {{if .Description}}[{{.Description}}]{{else}}[audio]{{end}} + [audio{{if $s.Sensitive}}/nsfw{{end}}{{if .Description}}: {{.Description}}{{end}}] {{else}}