aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/text_helper.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-01-28 07:16:55 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-01-28 07:16:55 +0000
commit0eacdcf9a3e37e05f47a4ded7f0a4aff3b65fbe4 (patch)
tree74705adf7f9a35c750f74657f0c4a29a6dcce5ff /actionpack/lib/action_view/helpers/text_helper.rb
parent4ac332fa9a16ae86b948251e372999b9f4618dec (diff)
downloadrails-0eacdcf9a3e37e05f47a4ded7f0a4aff3b65fbe4.tar.gz
rails-0eacdcf9a3e37e05f47a4ded7f0a4aff3b65fbe4.tar.bz2
rails-0eacdcf9a3e37e05f47a4ded7f0a4aff3b65fbe4.zip
Use a consistent load path to avoid double requires. Fix some scattered Ruby warnings.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6057 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
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)