Ticket #115 (closed defect: fixed)
Attribute values with brackets in them cause problems
| Reported by: | ntalbott | Owned by: | why |
|---|---|---|---|
| Priority: | critical | Milestone: | |
| Component: | ext/hpricot_scan | Version: | |
| Keywords: | Cc: | nathaniel@… |
Description
I've attached a patch which adds a test for the issue; to summarize:
doc = Hpricot('<input name="vendor[porkpies]"/>')
assert_equal 1, (doc/'input[@name^="vendor[porkpies]"]').length # PASSES
assert_equal 1, (doc/'input[@name="vendor[porkpies]"]').length # FAILS
assert_equal 0, (doc/'input[@name$="]]]]]"]').length # FAILS
Change History
Note: See
TracTickets for help on using
tickets.
