Ticket #47 (closed defect: invalid)
CSS-selector: "tag1 > tag2" works like "tag1 tag2". Bug in " > " parsing. Simply ">" works fine.
| Reported by: | cris | Owned by: | why |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | ext/hpricot_scan | Version: | |
| Keywords: | css-selector, > | Cc: |
Description
Tested on last(4.92) version. Css-selector " > " with spaces around it work like simple " ". But in example on page http://code.whytheluckystiff.net/hpricot/wiki/HpricotCssSearch used " > "-version:
doc.search("div.entryPermalink > a").
prepend("<b>found you on the left</b>").
append("<b>found you on the right</b>")
My non-working example:
>> doc.search("td[@class='det_l'][@bgcolor='#DADADA'] > img").size
=> 6
>> doc.search("td[@class='det_l'][@bgcolor='#DADADA']>img").size
=> 5
>> doc.search("td[@class='det_l'][@bgcolor='#DADADA'] img").size
=> 6
Change History
Note: See
TracTickets for help on using
tickets.
