aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-11-26 01:00:10 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-11-26 01:00:10 +0000
commit1d564d97c5216210be03862d90fd7ea222afdc52 (patch)
treec42cec89598866572dc459d928a1b522f4d2a266 /actionpack/lib
parenteacca8d7e6227d730918b829f022f2fb8592358c (diff)
downloadrails-1d564d97c5216210be03862d90fd7ea222afdc52.tar.gz
rails-1d564d97c5216210be03862d90fd7ea222afdc52.tar.bz2
rails-1d564d97c5216210be03862d90fd7ea222afdc52.zip
strip_tags passes through blank args such as nil or "". Closes #6702, references #2229.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5629 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-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 0b04bd323f..0b1b46b0f3 100644
--- a/actionpack/lib/action_view/helpers/text_helper.rb
+++ b/actionpack/lib/action_view/helpers/text_helper.rb
@@ -254,7 +254,7 @@ module ActionView
# html-scanner tokenizer and so its HTML parsing ability is limited by
# that of html-scanner.
def strip_tags(html)
- return nil if html.blank?
+ return html if html.blank?
if html.index("<")
text = ""
tokenizer = HTML::Tokenizer.new(html)