aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/vendor/html-scanner/html/document.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/vendor/html-scanner/html/document.rb')
-rw-r--r--actionpack/lib/action_controller/vendor/html-scanner/html/document.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/vendor/html-scanner/html/document.rb b/actionpack/lib/action_controller/vendor/html-scanner/html/document.rb
index c8e07b884c..9949afb6c9 100644
--- a/actionpack/lib/action_controller/vendor/html-scanner/html/document.rb
+++ b/actionpack/lib/action_controller/vendor/html-scanner/html/document.rb
@@ -11,7 +11,7 @@ module HTML #:nodoc:
attr_reader :root
# Create a new Document from the given text.
- def initialize(text, strict=false)
+ def initialize(text, strict=false, xml=false)
tokenizer = Tokenizer.new(text)
@root = Node.new(nil)
node_stack = [ @root ]
@@ -38,7 +38,7 @@ ignoring attempt to close #{node_stack.last.name} with #{node.name}
EOF
strict ? raise(msg) : warn(msg)
end
- elsif !node.childless? && node.closing != :close
+ elsif !node.childless?(xml) && node.closing != :close
node_stack.push node
end
end