diff --git a/app/models/open_source_project.rb b/app/models/open_source_project.rb index e3556ce55..2de5966bb 100644 --- a/app/models/open_source_project.rb +++ b/app/models/open_source_project.rb @@ -84,7 +84,8 @@ class OpenSourceProject < ActiveRecord::Base # end def short_description(length = 255) - description.gsub(/^(.{#{length}}[^\n\r]*).*$/m, '\1...').strip if description + #description.gsub(/^(.{#{length}}[^\n\r]*).*$/m, '\1...').strip if description + description.gsub(/<\/?.*?>/,"").html_safe if description end def applied_by?(user) diff --git a/app/models/project.rb b/app/models/project.rb index 5efaf10ab..4bd1f2774 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -623,7 +623,8 @@ class Project < ActiveRecord::Base # Returns a short description of the projects (first lines) def short_description(length = 255) - description.gsub(/^(.{#{length}}[^\n\r]*).*$/m, '\1...').strip if description + #description.gsub(/^(.{#{length}}[^\n\r]*).*$/m, '\1...').strip if description + description.gsub(/<\/?.*?>/,"").html_safe if description end def css_classes diff --git a/app/views/users/_course_form.html.erb b/app/views/users/_course_form.html.erb index f5cada9a8..4d9c58392 100644 --- a/app/views/users/_course_form.html.erb +++ b/app/views/users/_course_form.html.erb @@ -32,7 +32,7 @@
- <%= membership.course.description %> + <%= membership.course.short_description %>
- <%= membership.project.description%> + <%= membership.project.short_description%>