From 8066aa5eb1662f7045c29ddefeb1c8e5f86d00ba Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 3 Dec 2011 06:15:55 +0000 Subject: [PATCH] Rails3: helper: html_safe for "format_activity_description" method git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8035 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 5ad9b448c..42862175c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -176,7 +176,8 @@ module ApplicationHelper end def format_activity_description(text) - h(truncate(text.to_s, :length => 120).gsub(%r{[\r\n]*<(pre|code)>.*$}m, '...')).gsub(/[\r\n]+/, "
") + h(truncate(text.to_s, :length => 120).gsub(%r{[\r\n]*<(pre|code)>.*$}m, '...') + ).gsub(/[\r\n]+/, "
").html_safe end def format_version_name(version)