From 6526adcff9110419b15440139652d1192f269db5 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 9 Mar 2005 13:11:40 +0000 Subject: Fixed textilize to be resilient to getting nil parsed (by using Object#blank? instead of String#empty?) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@878 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/CHANGELOG | 2 ++ actionpack/lib/action_view/helpers/text_helper.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'actionpack') diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index dcf8e93351..d963b0e680 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fixed textilize to be resilient to getting nil parsed (by using Object#blank? instead of String#empty?) + * Fixed that the :multipart option in FormTagHelper#form_tag would be ignored [Yonatan Feldman] diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb index 1c67e3efb4..b97b1e130a 100644 --- a/actionpack/lib/action_view/helpers/text_helper.rb +++ b/actionpack/lib/action_view/helpers/text_helper.rb @@ -69,7 +69,7 @@ module ActionView # Returns the text with all the Textile codes turned into HTML-tags. # This method is only available if RedCloth can be required. def textilize(text) - text.empty? ? "" : RedCloth.new(text, [ :hard_breaks ]).to_html + text.blank? ? "" : RedCloth.new(text, [ :hard_breaks ]).to_html end # Returns the text with all the Textile codes turned into HTML-tags, but without the regular bounding

tag. -- cgit v1.2.3