#8220 closed bug (fixed)
is() bug on namespaced tag
Reported by: | raid3n | Owned by: | jitter |
---|---|---|---|
Priority: | high | Milestone: | 1.5.1 |
Component: | selector | Version: | 1.5 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description (last modified by )
Hi,
var html = "<xsd\:element>"; alert($(html).is("xsd\\:element"));
Outputs: Chrome: true Opera, Firefox: false
Solution: alert($(html).get(0).nodeName.toLowerCase() == "xsd\:element");
Regards, Andrea
Change History (4)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Component: | unfiled → selector |
---|---|
Milestone: | 1.next → 1.5.1 |
Owner: | set to jitter |
Priority: | undecided → high |
Status: | new → assigned |
comment:3 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Pull over tests from Sizzle. "Remove backslashes from tag name filter. Fixes #8220."
Changeset: f56b4a22a6cf37b3764939b0338bb545fa6b445f
comment:4 Changed 12 years ago by
Description: | modified (diff) |
---|
I fixed this for the XMLDocument case. e.g. when loading xml via ajax from server or when using jQuery.parseXML .
The use case as outlined in the report isn't supported at the moment. As you can't pass arbitrary xml string to $( html )
. If that works is mainly browser dependent and fails in most versions of IE. Also the differences between the browsers probably derive from the fact that the DOM Level 1 method getElementsByTag handles namespaced tagnames differently across browsers. For further info check #7583 and #6491 or just search the bug tracker for namespace, xml related tickets.
this is the example: http://jsfiddle.net/nBRHb/