about summary refs log tree commit diff
path: root/app/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/api/accounts/lookup_helper.rb2
-rw-r--r--app/helpers/stream_entries_helper.rb8
2 files changed, 10 insertions, 0 deletions
diff --git a/app/helpers/api/accounts/lookup_helper.rb b/app/helpers/api/accounts/lookup_helper.rb
new file mode 100644
index 000000000..5caf0e28c
--- /dev/null
+++ b/app/helpers/api/accounts/lookup_helper.rb
@@ -0,0 +1,2 @@
+module Api::Accounts::LookupHelper
+end
diff --git a/app/helpers/stream_entries_helper.rb b/app/helpers/stream_entries_helper.rb
index b044e8a61..28fc41ed5 100644
--- a/app/helpers/stream_entries_helper.rb
+++ b/app/helpers/stream_entries_helper.rb
@@ -27,4 +27,12 @@ module StreamEntriesHelper
   def favourited_by_me_class(status)
     user_signed_in? && current_user.account.favourited?(status) ? 'favourited' : ''
   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
 end