Bug Tracker

Modify

Ticket #4711 (closed bug: invalid)

Opened 4 years ago

Last modified 3 years ago

Webkit: find with colon ":" in search returns incorrect results

Reported by: wolfz0rz Owned by: john
Priority: minor Milestone: 1.4
Component: selector Version: 1.3.2
Keywords: find, colon, webkit, chrome, safari Cc:
Blocking: Blocked by:

Description

When attempting to parse the Yahoo Weather RSS feeds using JQuery 1.2.6, I'm unable to correctly grab an element with a colon in its name. This line works correctly in Firefox and IE, but in Chrome and Safari returns an empty array:

var temp = $(result.data).find("yweather
:condition").attr("temp");

Changing the find parameter to "condition" causes it to work correctly in Chrome and Safari, but then doesn't work for Firefox and IE.

This originally happened with use of JQuery 1.2.6, but I also tested it on 1.3.2 with the same results.

Change History

comment:1 Changed 4 years ago by wolfz0rz

An example RSS page can be found here:  http://weather.yahooapis.com/forecastrss?p=17019&u=f

The tag that I'm trying to get looks like this: <yweather:condition text="Fair" code="34" temp="61" date="Mon, 01 Jun 2009 9:56 am EDT" />

comment:2 Changed 4 years ago by kilativ

This applies to any xml with a namespace. I'd think it should be higher priority.

comment:3 Changed 3 years ago by addyosmani

  • Status changed from new to closed
  • Resolution set to invalid

Please note that for any special characters you wish to use in selectors (eg. the ones referred to in your ticket) it is advised that you escape these if you wish to use them with jQuery. See the top of  http://api.jquery.com/category/selectors/ for further information.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.