Ticket #11296 (closed bug: invalid)
$ selector for base64'd id
| Reported by: | aprilkacau@… | Owned by: | aprilkacau@… |
|---|---|---|---|
| Priority: | undecided | Milestone: | None |
| Component: | unfiled | Version: | 1.7.1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
I have rows of data in a table, each row have an id that's basically an base64'd string for the appropriate item's key in a huge array collection.
Basically, if I do this:
document.getElementById('MU4yRC50eHQ=')
there's one exact and correct match.
But when doing this:
$('#MU4yRC50eHQ=')
nothing returned
I checked the problematic html structures through W3 HTML validator as HTML5 DOCTYPE, and it passed, so I assumed that using base64'd string as an element ID is valid.
I really hate to submit this as a bug, but I have nowhere else to ask, although I'd probably end up using document.getElementId, I guess there's no harm mentioning this to the jQuery's dev team :)
Change History
comment:1 Changed 17 months ago by sindresorhus
- Owner set to aprilkacau@…
- Status changed from new to pending
comment:2 Changed 17 months ago by dmethvin
- Status changed from pending to closed
- Resolution set to invalid
I really hate to submit this as a bug, but I have nowhere else to ask
Try StackOverflow or http://forum.jquery.com .
Hint: "=" is a special character.
comment:3 Changed 7 months ago by anonymous
workaround: $("[id='MU4yRC50eHQ=']") will select your div
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.
Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to get started.