FIX: clean html before sending it to jquery for collapsing

This commit is contained in:
Sam
2015-05-20 14:42:54 +10:00
parent 8be746b285
commit 8013b6a511
3 changed files with 8 additions and 12 deletions

View File

@ -196,16 +196,7 @@ class UserSerializer < BasicUserSerializer
end
def bio_excerpt
# If they have a bio return it
excerpt = object.user_profile.bio_excerpt
return excerpt if excerpt.present?
# Without a bio, determine what message to show
if scope.user && scope.user.id == object.id
I18n.t('user_profile.no_info_me', username_lower: object.username_lower)
else
I18n.t('user_profile.no_info_other', name: object.name)
end
object.user_profile.bio_excerpt(350 ,keep_newlines: true)
end
def include_suspend_reason?