From 447cfef62d74a670ddd600c0240f41746ac2fe0a Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 11 Mar 2016 16:47:36 +0100 Subject: Improving feed queries, switching API to doorkeeper authentication --- app/helpers/stream_entries_helper.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/helpers') diff --git a/app/helpers/stream_entries_helper.rb b/app/helpers/stream_entries_helper.rb index 2a59553ab..60955a0a7 100644 --- a/app/helpers/stream_entries_helper.rb +++ b/app/helpers/stream_entries_helper.rb @@ -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}@#{account.acct}" end.html_safe -- cgit