Sanitize remote html in atom feeds, API (not just UI), use cached mention
relations on Status#mentions
This commit is contained in:
parent
7cd3de3494
commit
c8999a116e
6 changed files with 18 additions and 31 deletions
|
@ -12,6 +12,14 @@ module ApplicationHelper
|
|||
id.start_with?("tag:#{Rails.configuration.x.local_domain}")
|
||||
end
|
||||
|
||||
def content_for_status(actual_status)
|
||||
if actual_status.local?
|
||||
linkify(actual_status)
|
||||
else
|
||||
sanitize(actual_status.content, tags: %w(a br p), attributes: %w(href rel))
|
||||
end
|
||||
end
|
||||
|
||||
def linkify(status)
|
||||
mention_hash = {}
|
||||
status.mentions.each { |m| mention_hash[m.acct] = m }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue