diff --git a/app/lib/quote_formatter.rb b/app/lib/quote_formatter.rb
index f73f39cfd..d227616e6 100644
--- a/app/lib/quote_formatter.rb
+++ b/app/lib/quote_formatter.rb
@@ -10,12 +10,11 @@ class QuoteFormatter
end
def to_s
- def render_quote
- link = link_to_url({ url: ap_tag_manager.url_for(quote) })
- <<~HTML.squish
-
~~~~~~~~~~
[#{link}]
- HTML
- end
+ url = ActivityPub::TagManager.instance.url_for(status.quote)
+ link = encode_and_link_urls(url)
+ <<~HTML.squish
+
QT: #{link}"
+ HTML
end
def format_in_quote(status, **options)
diff --git a/app/lib/text_formatter.rb b/app/lib/text_formatter.rb
index 53f3ecf35..48e2fc233 100644
--- a/app/lib/text_formatter.rb
+++ b/app/lib/text_formatter.rb
@@ -31,7 +31,7 @@ class TextFormatter
end
def to_s
- return ''.html_safe if text.blank? & !quote?
+ return ''.html_safe if text.blank?
html = rewrite do |entity|
if entity[:url]
@@ -43,8 +43,6 @@ class TextFormatter
end
end
- html += quotify if quote?
-
html = simple_format(html, {}, sanitize: false).delete("\n") if multiline?
html.html_safe # rubocop:disable Rails/OutputSafety
@@ -120,7 +118,7 @@ class TextFormatter
return "@#{h(entity[:screen_name])}" if account.nil?
- url = ap_tag_manager.url_for(account)
+ url = ActivityPub::TagManager.instance.url_for(account)
display_username = same_username_hits&.positive? || with_domains? ? account.pretty_acct : account.username
<<~HTML.squish
@@ -136,10 +134,6 @@ class TextFormatter
@tag_manager ||= TagManager.instance
end
- def ap_tag_manager
- @ap_tag_manager ||= ActivityPub::TagManager.instance
- end
-
delegate :local_domain?, to: :tag_manager
def multiline?