0
0
Fork 0

Fix the summary of converted object types to be treated as HTML (#28629)

This commit is contained in:
André Menrath 2024-09-24 17:57:53 +02:00 committed by GitHub
parent c36a76b9eb
commit 556837f156
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 63 additions and 4 deletions

View file

@ -342,7 +342,15 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
end
def converted_text
linkify([@status_parser.title.presence, @status_parser.spoiler_text.presence, @status_parser.url || @status_parser.uri].compact.join("\n\n"))
[formatted_title, @status_parser.spoiler_text.presence, formatted_url].compact.join("\n\n")
end
def formatted_title
"<h2>#{@status_parser.title}</h2>" if @status_parser.title.present?
end
def formatted_url
linkify(@status_parser.url || @status_parser.uri)
end
def unsupported_media_type?(mime_type)