Improving feed queries, switching API to doorkeeper authentication
This commit is contained in:
parent
b919f39b31
commit
447cfef62d
12 changed files with 50 additions and 11 deletions
|
@ -23,8 +23,9 @@ module StreamEntriesHelper
|
|||
def linkify(status)
|
||||
mention_hash = {}
|
||||
status.mentions.each { |m| mention_hash[m.acct] = m }
|
||||
coder = HTMLEntities.new
|
||||
|
||||
auto_link(CGI.escapeHTML(status.text), link: :urls, html: { target: '_blank', rel: 'nofollow' }).gsub(Account::MENTION_RE) do |m|
|
||||
auto_link(coder.encode(status.text), link: :urls, html: { target: '_blank', rel: 'nofollow' }).gsub(Account::MENTION_RE) do |m|
|
||||
account = mention_hash[Account::MENTION_RE.match(m)[1]]
|
||||
"#{m.split('@').first}<a href=\"#{url_for_target(account)}\" class=\"mention\">@<span>#{account.acct}</span></a>"
|
||||
end.html_safe
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue