Ticket #2364 (closed bug: fixed)
xml selector does not seem to work with mixed case tags
| Reported by: | lideln | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.2.4 |
| Component: | ajax | Version: | 1.2.3 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
I tried today the jQuery ajax capabilities. It's impressive, but I found something strange : my ajax answer was containing a mixed-case tag, just like : "userId" In my callback function : function ajaxAnswer(data, textStatus) {
var id = $('userId', data).text();
}
It returns empty string, although in firebug I can see that my answer does contain a userId (and it was working with my old "hand-written" ajax code (with xhr() etc.)
For now I changed all my ajax answers to return only lowercase tags, but it would be nice if people could use mixed case.
Another thing : are params of jQuery.post(page, params, callback) automatically encodeURIComponent-ed ?
Change History
comment:2 Changed 5 years ago by pbcomm
I ran into the same problem using outside xml feed where they have mixed case tags like "videoItem". Does anyone have a solution for this one?
comment:3 Changed 5 years ago by pbcomm
If someone emailed me about this bug, please do it again, it came in as spam :( sorry.
comment:4 Changed 3 years ago by dmethvin
- Status changed from new to closed
- Resolution set to fixed
Should have been fixed in 1.4 (actually Sizzle):
http://github.com/jeresig/sizzle/commit/0e0177d990c72c00aa16ee8ca8bf96630d46726f
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

concerning the post-scriptum about encoreURIComponent, I tried to encode my params and it gave me (when getting them back from my DB), a string with caracters encoded, so I guess it's because it's been encoded twice (then the '%' sign has been encoded and then not translated in the php page), so I think that you already encode params, that's great news :)