Fix #13, Atom feeds now contain formatted post content
This commit is contained in:
@ -12,6 +12,17 @@ module ApplicationHelper
|
||||
id.start_with?("tag:#{Rails.configuration.x.local_domain}")
|
||||
end
|
||||
|
||||
def linkify(status)
|
||||
mention_hash = {}
|
||||
status.mentions.each { |m| mention_hash[m.acct] = m }
|
||||
coder = HTMLEntities.new
|
||||
|
||||
auto_link(coder.encode(status.text), link: :urls, html: { rel: 'nofollow noopener' }).gsub(Account::MENTION_RE) do |m|
|
||||
account = mention_hash[Account::MENTION_RE.match(m)[1]]
|
||||
return "#{m.split('@').first}<a href=\"#{url_for_target(account)}\" class=\"mention\">@<span>#{account.acct}</span></a>"
|
||||
end.html_safe
|
||||
end
|
||||
|
||||
def active_nav_class(path)
|
||||
current_page?(path) ? 'active' : ''
|
||||
end
|
||||
|
Reference in New Issue
Block a user