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
This commit is contained in:
Toshi MARUYAMA 2011-12-03 06:15:55 +00:00
parent 10ae93826e
commit 8066aa5eb1
1 changed files with 2 additions and 1 deletions

View File

@ -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]+/, "<br />")
h(truncate(text.to_s, :length => 120).gsub(%r{[\r\n]*<(pre|code)>.*$}m, '...')
).gsub(/[\r\n]+/, "<br />").html_safe
end
def format_version_name(version)