Mercurial > hg > soundsoftware-site
changeset 330:f1a12c3b4587 cannam-pre-20110113-merge
We don't actually want text formatting in our short summary, but we don't want wiki metacharacters either. So apply wiki formatting and then strip out the tags in a very naive fashion.
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Tue, 29 Mar 2011 18:03:55 +0100 |
parents | a89626bf10c7 |
children | 4ed4207d81c5 e665cc1fdf07 |
files | app/helpers/projects_helper.rb |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/app/helpers/projects_helper.rb Tue Mar 29 11:14:27 2011 +0100 +++ b/app/helpers/projects_helper.rb Tue Mar 29 18:03:55 2011 +0100 @@ -127,7 +127,8 @@ else s << " <span class='private'>" << l("field_is_private") << "</span>" end - s << "<div class='wiki description'>#{textilizable(project.short_description, :project => project)}</div>" unless project.description.blank? + desc = textilizable(project.short_description, :project => project).gsub(/<[^>]+>/, '') + s << "<div class='wiki description'>#{desc}</div>" unless project.description.blank? s << "</div>\n" ancestors << project end