Ticket #128 (new defect)
Colons in attribute values are seemingly mis-handled
| Reported by: | robholland | Owned by: | why |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | lib/hpricot | Version: | |
| Keywords: | Cc: |
Description
Works fine with one ':'
doc = Hpricot("<root id='foo:bah'/>")
=> #<Hpricot::Doc {emptyelem <root id="foo:bah">}>
doc/"#foo:bah"
=> #<Hpricot::Elements[{emptyelem <root id="foo:bah">}]>
2+ ':' breaks things
doc = Hpricot("<root id='foo:bah:foo'/>")
=> #<Hpricot::Doc {emptyelem <root id="foo:bah:foo">}>
doc/"#foo:bah:foo"
=> #<Hpricot::Elements[]>
=> #<Hpricot::Elements[]>
doc/"[@id='foo:bah:foo']"
=> #<Hpricot::Elements[]>
I guess this is some how related to namespace parsing? Either way, I would expect the latter search to work, even if only via the latter method of comparing against @id. As far as I know there is no reason to look for namespaces inside of attribute values.
