aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/text_helper.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb
index 8b724127a2..36ed899cf0 100644
--- a/actionpack/lib/action_view/helpers/text_helper.rb
+++ b/actionpack/lib/action_view/helpers/text_helper.rb
@@ -213,7 +213,8 @@ module ActionView
# tokenizer and so it's HTML parsing ability is limited by that of html-scanner.
#
# Returns the tag free text.
- def strip_tags(html)
+ def strip_tags(html)
+ return nil if html.blank?
if html.index("<")
text = ""
tokenizer = HTML::Tokenizer.new(html)