aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-03-09 13:11:40 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-03-09 13:11:40 +0000
commit6526adcff9110419b15440139652d1192f269db5 (patch)
tree08aff2c5d100704d112373d51de062a6d2f29c06 /actionpack/lib/action_view
parentc81f0309ebb361ae04613a2af1317624ab878dc8 (diff)
downloadrails-6526adcff9110419b15440139652d1192f269db5.tar.gz
rails-6526adcff9110419b15440139652d1192f269db5.tar.bz2
rails-6526adcff9110419b15440139652d1192f269db5.zip
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
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/text_helper.rb2
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 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.
# <i>This method is only available if RedCloth can be required</i>.
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 <p> tag.