aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/text_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view/helpers/text_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/text_helper.rb16
1 files changed, 2 insertions, 14 deletions
diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb
index 236e1492ac..e60f6c2986 100644
--- a/actionpack/lib/action_view/helpers/text_helper.rb
+++ b/actionpack/lib/action_view/helpers/text_helper.rb
@@ -1,4 +1,5 @@
-require File.dirname(__FILE__) + '/tag_helper'
+require 'action_view/helpers/tag_helper'
+require 'html/document'
module ActionView
module Helpers #:nodoc:
@@ -192,19 +193,6 @@ module ActionView
text.gsub(/<a\b.*?>(.*?)<\/a>/mi, '\1')
end
- # Try to require the html-scanner library
- begin
- require 'html/tokenizer'
- require 'html/node'
- rescue LoadError
- # if there isn't a copy installed, use the vendor version in
- # ActionController
- $:.unshift File.join(File.dirname(__FILE__), "..", "..",
- "action_controller", "vendor", "html-scanner")
- require 'html/tokenizer'
- require 'html/node'
- end
-
VERBOTEN_TAGS = %w(form script plaintext) unless defined?(VERBOTEN_TAGS)
VERBOTEN_ATTRS = /^on/i unless defined?(VERBOTEN_ATTRS)