Rails3: helper: use html_safe at simple_format_without_paragraph of ApplicationHelper

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7585 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-10-06 11:03:58 +00:00
parent 942cd9bac2
commit 55f10b90f4
1 changed files with 2 additions and 1 deletions

View File

@ -774,7 +774,8 @@ module ApplicationHelper
text.to_s. text.to_s.
gsub(/\r\n?/, "\n"). # \r\n and \r -> \n gsub(/\r\n?/, "\n"). # \r\n and \r -> \n
gsub(/\n\n+/, "<br /><br />"). # 2+ newline -> 2 br gsub(/\n\n+/, "<br /><br />"). # 2+ newline -> 2 br
gsub(/([^\n]\n)(?=[^\n])/, '\1<br />') # 1 newline -> br gsub(/([^\n]\n)(?=[^\n])/, '\1<br />'). # 1 newline -> br
html_safe
end end
def lang_options_for_select(blank=true) def lang_options_for_select(blank=true)