Bug Tracker

Opened 13 years ago

Closed 12 years ago

#6491 closed bug (patchwelcome)

Google Chrome vs. Firefox Ajax RSS Test

Reported by: jrevillini Owned by:
Priority: undecided Milestone:
Component: unfiled Version: 1.4.4
Keywords: rss, ajax Cc:
Blocked by: Blocking:

Description

This may need to be filed on one of the browsers' bug trackers, but I thought I'd start here first to confirm the bug.

In using jQuery to parse RSS feeds, I'm seeing different behavior in Chrome and Firefox when using the $('item title') selector.

Chrome considers <title> within <item> and <media:title> within <item> to match the query.

Firefox does not consider a <media:title> within <item> to match the same query.

I've attached a test case which can be launched in both browsers to show the issue. I think it needs to be placed into a website folder and viewed over http to work. Loading the html file using the Open command in each browser did not run the code.

Attachments (1)

Google Chrome vs. Firefox Ajax RSS Test.tar.gz (3.6 KB) - added by jrevillini 13 years ago.
unzip this to a folder that you can access on a local web server, then access the html file over http in both chrome and firefox.

Download all attachments as: .zip

Change History (5)

Changed 13 years ago by jrevillini

unzip this to a folder that you can access on a local web server, then access the html file over http in both chrome and firefox.

comment:1 Changed 12 years ago by dmethvin

Component: unfiledselector

comment:2 Changed 12 years ago by Rick Waldron

Milestone: 1.4.3
Owner: set to jrevillini
Priority: undecided
Status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a reduced jsFiddle test case to help us assess your ticket!

Additionally, test against the jQuery 0 GIT version to ensure the issue still exists. Be Excellent to eachother!

comment:3 Changed 12 years ago by jitter

Component: selectorunfiled
Owner: jrevillini deleted
Status: pendingnew
Version: 1.4.21.4.4

test case FF only return "item title" for first test. While Chrome and Opera return "item title" and "media title".

On the second test (of course) all 3 browsers return the same output.

comment:4 Changed 12 years ago by snover

Resolution: patchwelcome
Status: newclosed

So this appears like this may be a spec bug—or at least a kinda nasty, poorly-defined incompatibility between the css3-namespace spec and Selectors API spec.

The CSS3 namespace spec, prefixes section states that if a namespace prefix is omitted, the namespace selected is the default namespace, and that the default namespace contains all elements with no explicitly defined namespace. Elements with explicitly defined namespaces are not part of the default namespace.

The Selectors API, in contrast, implies (but does not state explicitly) that if a namespace prefix is omitted, the namespace to select from is ALL namespaces. This is based on the last example in Section 8. The spec itself only specifies that it should throw an Error if someone tries to use a namespace other than the null (default) namespace or the “all namespaces” selector.

Given that the limitations in Selectors API § 6.3 would make it impossible to select some elements if the null namespace was used, it would seem that Firefox is violating the spec here by not returning media-namespaced elements. This is not strictly a jQuery bug, and since namespaces are not something that people use very often, I’m going to close this as patchwelcome.

Version 0, edited 12 years ago by snover (next)
Note: See TracTickets for help on using tickets.