Side navigation
#12531 closed bug (duplicate)
Opened September 13, 2012 03:16PM UTC
Closed November 02, 2012 01:45AM UTC
Last modified November 27, 2012 05:37PM UTC
elem[attr] selector
Reported by: | phantick@gmail.com | Owned by: | rwaldron |
---|---|---|---|
Priority: | high | Milestone: | None |
Component: | core | Version: | 1.7.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Hi.
jQuery JavaScript Library v1.7.1
I have element
<tr target="contacts" key="<1291012254.6.phantom@itoolabs.com>">
And i have query
a = $("tr[key='<1291012254.6.phantom@itoolabs.com>']")
Now a - is array with one text node, nodeValue is "<1291012254.6.phantom@itoolabs.com>"
But, i expect array with TR node
Bug?
Dmitry Minkin
Attachments (0)
Change History (9)
Changed September 13, 2012 04:25PM UTC by comment:1
component: | unfiled → core |
---|---|
milestone: | None → 1.9 |
priority: | undecided → high |
Changed September 14, 2012 01:10AM UTC by comment:2
status: | new → open |
---|
Changed September 14, 2012 10:10PM UTC by comment:3
I wrote a fix for this, the pull request can be found here:
Changed September 15, 2012 05:48PM UTC by comment:4
owner: | → rwaldron |
---|---|
status: | open → assigned |
Changed September 15, 2012 05:49PM UTC by comment:5
I've got a much smaller patch for this, but there is still an outstanding issue to address. Unfortunately I have to leave and drive 4 hours to Boston so I'll update when it's complete.
Changed September 15, 2012 09:39PM UTC by comment:7
Related, but not a dup
Changed November 02, 2012 01:45AM UTC by comment:8
Changed November 27, 2012 05:37PM UTC by comment:9
milestone: | 1.9 → None |
---|
This is running afoul of the "looks like HTML" rule, which sees the
<>
in the string and processes it like$(html)
instead of$(selector)
. As of jQuery 1.9 we'll require any string processed by$(html)
to *start* with a<
character, otherwise it will be treated as a selector. For cases where you want leading text nodes there is already$.parseHTML()
which needs documentation still.