Ticket #65 (closed defect: worksforme)
Search fails with @ in attribute searches
| Reported by: | gonzoprosperity | Owned by: | why |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | ext/hpricot_scan | Version: | |
| Keywords: | Cc: |
Description
When using either HTML or XML mode (Hpricot.XML), when I attempt to perform a search using an attribute value selector,
doc.search("//object/param[@value='abc']")
I get
NoMethodError: undefined method `filter[@[=]]' for #<Hpricot::Elem:0x3ab2950>
/usr/local/lib/ruby/gems/1.8/gems/hpricot-0.5/lib/hpricot/elements.rb:231:in `send'
/usr/local/lib/ruby/gems/1.8/gems/hpricot-0.5/lib/hpricot/elements.rb:231:in `filter'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:33:in `find_all'
/usr/local/lib/ruby/gems/1.8/gems/hpricot-0.5/lib/hpricot/elements.rb:229:in `each'
/usr/local/lib/ruby/gems/1.8/gems/hpricot-0.5/lib/hpricot/elements.rb:229:in `find_all'
/usr/local/lib/ruby/gems/1.8/gems/hpricot-0.5/lib/hpricot/elements.rb:229:in `filter'
/usr/local/lib/ruby/gems/1.8/gems/hpricot-0.5/lib/hpricot/traverse.rb:269:in `search'
test/unit/hpricot_test.rb:28:in `test_parsing'
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
