diff options
Diffstat (limited to 'actionpack/lib/action_controller/vendor/html-scanner/html/node.rb')
-rw-r--r-- | actionpack/lib/action_controller/vendor/html-scanner/html/node.rb | 6 |
1 files changed, 3 insertions, 3 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 8d1c711226..6d045b0367 100644 --- a/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb +++ b/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb @@ -379,9 +379,9 @@ module HTML #:nodoc: # :child => /hello world/ } def match(conditions) conditions = validate_conditions(conditions) - - # only Text nodes have content - return false if conditions[:content] + + # check content of child nodes + return false unless children.find { |child| child.match(conditions[:content]) } if conditions[:content] # test the name return false unless match_condition(@name, conditions[:tag]) if conditions[:tag] |