Fix activitypub html reference text

This commit is contained in:
KMY 2023-07-06 19:50:05 +09:00
parent 3cb89c592f
commit 4eb28fe985

View file

@ -46,7 +46,7 @@ class ProcessReferencesService < BaseService
end
def scan_text!
text = @status.text.gsub('\u003c', '<').gsub('\u003e', '>').gsub(%r{</?[^>]*>}, '')
text = @status.account.local? ? @status.text : @status.text.gsub('\\u003c', '<').gsub('\\u003e', '>').gsub(%r{</?[^>]*>}, '')
@scan_text = fetch_statuses!(text.scan(REFURL_EXP).pluck(3).uniq).map(&:id).uniq.filter { |status_id| !status_id.zero? }
end