From 55f10b90f4baf3a2c710c89f67e275424ddd5a72 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 6 Oct 2011 11:03:58 +0000 Subject: [PATCH] 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 --- 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 df35a379d..93ef7a6ad 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -774,7 +774,8 @@ module ApplicationHelper text.to_s. gsub(/\r\n?/, "\n"). # \r\n and \r -> \n gsub(/\n\n+/, "

"). # 2+ newline -> 2 br - gsub(/([^\n]\n)(?=[^\n])/, '\1
') # 1 newline -> br + gsub(/([^\n]\n)(?=[^\n])/, '\1
'). # 1 newline -> br + html_safe end def lang_options_for_select(blank=true) -- 2.39.5