提交 2dd0ec48 编写于 作者: J Jeremy Kemper

Autoload HTML::Document and sanitizers

上级 fb4bb93d
require 'rexml/document'
require 'html/document'
module ActionController
module Assertions
# A small suite of assertions that test responses from Rails applications.
......
......@@ -3,8 +3,7 @@
# Under MIT and/or CC By license.
#++
require 'rexml/document'
require 'html/document'
require 'action_controller/vendor/html-scanner'
module ActionController
module Assertions
......
require 'rexml/document'
require 'html/document'
module ActionController
module Assertions
# Pair of assertions to testing elements in the HTML output of the response.
......
$LOAD_PATH << "#{File.dirname(__FILE__)}/html-scanner"
module HTML
autoload :Document, 'html/document'
autoload :Sanitizer, 'html/sanitizer'
autoload :FullSanitizer, 'html/sanitizer'
autoload :LinkSanitizer, 'html/sanitizer'
autoload :WhiteListSanitizer, 'html/sanitizer'
end
require 'action_view/helpers/tag_helper'
begin
require 'html/document'
rescue LoadError
html_scanner_path = "#{File.dirname(__FILE__)}/../../action_controller/vendor/html-scanner"
if File.directory?(html_scanner_path)
$:.unshift html_scanner_path
require 'html/document'
end
end
require 'action_controller/vendor/html-scanner'
module ActionView
module Helpers #:nodoc:
......
require 'action_view/helpers/tag_helper'
begin
require 'html/document'
rescue LoadError
html_scanner_path = "#{File.dirname(__FILE__)}/../../action_controller/vendor/html-scanner"
if File.directory?(html_scanner_path)
$:.unshift html_scanner_path
require 'html/document'
end
end
module ActionView
module Helpers #:nodoc:
# The TextHelper module provides a set of methods for filtering, formatting
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册