diff options
author | Michael Koziarski <michael@koziarski.com> | 2007-09-21 20:45:49 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2007-09-21 20:45:49 +0000 |
commit | 9b468f4cd7daa9f1e8122938e6c2c5b8bf235a5f (patch) | |
tree | 26035d76b000cf31f6ada5155af5a4a2cd410628 /actionpack/lib/action_controller/vendor | |
parent | 4e0fef46369e78dd0b326c506b3006915edddfd3 (diff) | |
download | rails-9b468f4cd7daa9f1e8122938e6c2c5b8bf235a5f.tar.gz rails-9b468f4cd7daa9f1e8122938e6c2c5b8bf235a5f.tar.bz2 rails-9b468f4cd7daa9f1e8122938e6c2c5b8bf235a5f.zip |
[html-scanner] Fix parsing of empty tags. Closes #7641. [anthony.bailey]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7528 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/vendor')
-rw-r--r-- | actionpack/lib/action_controller/vendor/html-scanner/html/document.rb | 3 |
1 files changed, 3 insertions, 0 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 29422937b2..329ab01560 100644 --- a/actionpack/lib/action_controller/vendor/html-scanner/html/document.rb +++ b/actionpack/lib/action_controller/vendor/html-scanner/html/document.rb @@ -22,6 +22,9 @@ module HTML #:nodoc: if node.tag? if node_stack.length > 1 && node.closing == :close if node_stack.last.name == node.name + if node_stack.last.children.empty? + node_stack.last.children << Text.new(node_stack.last, node.line, node.position, "") + end node_stack.pop else open_start = node_stack.last.position - 20 |