Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `README.md`: Discarded upstream changes: we have our own README - `app/controllers/follower_accounts_controller.rb`: Port upstream's minor refactoring
This commit is contained in:
@@ -23,19 +23,28 @@ module FormattingHelper
|
||||
|
||||
before_html = begin
|
||||
if status.spoiler_text?
|
||||
"<p><strong>#{I18n.t('rss.content_warning', locale: available_locale_or_nil(status.language) || I18n.default_locale)}</strong> #{h(status.spoiler_text)}</p><hr />"
|
||||
else
|
||||
''
|
||||
tag.p do
|
||||
tag.strong do
|
||||
I18n.t('rss.content_warning', locale: available_locale_or_nil(status.language) || I18n.default_locale)
|
||||
end
|
||||
|
||||
status.spoiler_text
|
||||
end + tag.hr
|
||||
end
|
||||
end.html_safe # rubocop:disable Rails/OutputSafety
|
||||
end
|
||||
|
||||
after_html = begin
|
||||
if status.preloadable_poll
|
||||
"<p>#{status.preloadable_poll.options.map { |o| "<input type=#{status.preloadable_poll.multiple? ? 'checkbox' : 'radio'} disabled /> #{h(o)}" }.join('<br />')}</p>"
|
||||
else
|
||||
''
|
||||
tag.p do
|
||||
safe_join(
|
||||
status.preloadable_poll.options.map do |o|
|
||||
tag.send(status.preloadable_poll.multiple? ? 'checkbox' : 'radio', o, disabled: true)
|
||||
end,
|
||||
tag.br
|
||||
)
|
||||
end
|
||||
end
|
||||
end.html_safe # rubocop:disable Rails/OutputSafety
|
||||
end
|
||||
|
||||
prerender_custom_emojis(
|
||||
safe_join([before_html, html, after_html]),
|
||||
|
Reference in New Issue
Block a user