FIX: Don't incluide a trailing `<br>` in the bio excerpt
This commit is contained in:
parent
3065b7db4c
commit
ed4b2b6d8d
|
@ -20,7 +20,7 @@ class UserProfile < ActiveRecord::Base
|
|||
BAKED_VERSION = 1
|
||||
|
||||
def bio_excerpt(length=350, opts={})
|
||||
excerpt = PrettyText.excerpt(bio_cooked, length, opts)
|
||||
excerpt = PrettyText.excerpt(bio_cooked, length, opts).sub(/<br>$/, '')
|
||||
return excerpt if excerpt.blank? || (user.has_trust_level?(TrustLevel[1]) && !user.suspended?)
|
||||
PrettyText.strip_links(excerpt)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue