aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/models/user.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 617b51c60..e6c666e47 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -354,12 +354,13 @@ class User < ActiveRecord::Base
end
# Return about me text for display as HTML
+ # TODO: Move this to a view helper
def get_about_me_for_html_display
text = self.about_me.strip
text = CGI.escapeHTML(text)
text = MySociety::Format.make_clickable(text, :contract => 1)
text = text.gsub(/\n/, '<br>')
- return text
+ return text.html_safe
end
def json_for_api