aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/vendor/html-scanner/html
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/vendor/html-scanner/html')
-rw-r--r--actionpack/lib/action_controller/vendor/html-scanner/html/node.rb8
-rw-r--r--actionpack/lib/action_controller/vendor/html-scanner/html/version.rb2
2 files changed, 8 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb b/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb
index fb961570c4..218db80823 100644
--- a/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb
+++ b/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb
@@ -412,7 +412,13 @@ module HTML #:nodoc:
conditions = validate_conditions(conditions)
# check content of child nodes
- return false unless children.find { |child| child.match(conditions[:content]) } if conditions[:content]
+ if conditions[:content]
+ if children.empty?
+ return false unless match_condition("", conditions[:content])
+ else
+ return false unless children.find { |child| child.match(conditions[:content]) }
+ end
+ end
# test the name
return false unless match_condition(@name, conditions[:tag]) if conditions[:tag]
diff --git a/actionpack/lib/action_controller/vendor/html-scanner/html/version.rb b/actionpack/lib/action_controller/vendor/html-scanner/html/version.rb
index 99a8d5766c..6d645c3e14 100644
--- a/actionpack/lib/action_controller/vendor/html-scanner/html/version.rb
+++ b/actionpack/lib/action_controller/vendor/html-scanner/html/version.rb
@@ -3,7 +3,7 @@ module HTML #:nodoc:
MAJOR = 0
MINOR = 5
- TINY = 2
+ TINY = 3
STRING = [ MAJOR, MINOR, TINY ].join(".")