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:
parent
10ae93826e
commit
8066aa5eb1
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue