diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-03-21 17:02:16 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-03-21 17:02:16 +0100 |
commit | 9d55529318a285ced484b9216df9064914d6f790 (patch) | |
tree | 5e6ac6135236c44e5a75105c7af64652a27adce4 /app/helpers | |
parent | bf08d46e58c423688d870cf128ded7fd36009115 (diff) |
Fix text color in dashboard inputs, sanitize remote status content in UI,
simplify FanOutOnWriteService, add /api/accounts/lookup method
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/api/accounts/lookup_helper.rb | 2 | ||||
-rw-r--r-- | app/helpers/stream_entries_helper.rb | 8 |
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 |