1
0
Fork 0
forked from gitea/nas

Fix status reference worker parameters error

This commit is contained in:
KMY 2023-07-06 13:23:38 +09:00
parent 22ad776635
commit ad5f9492fb
6 changed files with 8 additions and 9 deletions

View file

@ -44,7 +44,7 @@ class ProcessReferencesService < BaseService
end
def scan_text!
text = @status.text.gsub(%r{</?[^>]*>}, '')
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