From 0f4e6938bc5690bbc9545a0e088479ca879605bc Mon Sep 17 00:00:00 2001 From: Dima Krasner Date: Wed, 27 Dec 2023 10:51:36 +0200 Subject: [PATCH] skip ToHTML() in votes --- front/post.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/front/post.go b/front/post.go index a249f26c..484eee15 100644 --- a/front/post.go +++ b/front/post.go @@ -131,11 +131,15 @@ func post(w text.Writer, r *request, inReplyTo *ap.Object, to ap.Audience, cc ap hash := sha256.Sum256([]byte(postID)) + if inReplyTo != nil && inReplyTo.Type != ap.QuestionObject { + content = plain.ToHTML(content) + } + note := ap.Object{ Type: ap.NoteObject, ID: postID, AttributedTo: r.User.ID, - Content: plain.ToHTML(content), + Content: content, Published: now, To: to, CC: cc,