From 9a68f5b6577f5e10f97e8ba10b718cd1cda8a1c7 Mon Sep 17 00:00:00 2001
From: Stephen Celis
Date: Mon, 8 Feb 2010 08:47:01 -0600
Subject: [PATCH] Fix simple_format.
Bypass html_safe by consistently using String#insert.
---
actionpack/lib/action_view/helpers/text_helper.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb
index 1e99c84..0998e3a 100644
--- a/actionpack/lib/action_view/helpers/text_helper.rb
+++ b/actionpack/lib/action_view/helpers/text_helper.rb
@@ -332,7 +332,7 @@ module ActionView
text.gsub!(/\n\n+/, "
\n\n#{start_tag}") # 2+ newline -> paragraph
text.gsub!(/([^\n]\n)(?=[^\n])/, '\1
') # 1 newline -> br
text.insert 0, start_tag
- text << ""
+ text.insert -1, ""
raw(text)
end
--
1.6.6.1