From 0eacdcf9a3e37e05f47a4ded7f0a4aff3b65fbe4 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 28 Jan 2007 07:16:55 +0000 Subject: 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 --- actionpack/lib/action_view/helpers/text_helper.rb | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'actionpack/lib/action_view/helpers/text_helper.rb') 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>/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) -- cgit v1.2.3