Ticket #8206 (closed bug: wontfix)
Script:contains('text') fails (returns nothing) in IE8 and IE7
| Reported by: | heyyeah | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | 1.next |
| Component: | selector | Version: | 1.5 |
| Keywords: | Cc: | msie | |
| Blocking: | Blocked by: |
Description
IE7 and IE8 can't find items using jQuery("script:contains('text')") JSFiddle example http://jsfiddle.net/heyyeah/rxCPx/4/
Result is "Script:contains('flag').length: 2" in Firefox 3.6, Chrome beta 9, Safari 5.03 and 0 in IE. (2 is correct as it the flag is found in the test HTML and javascript). Also errors in previous versions of jQuery.
Change History
comment:1 Changed 2 years ago by danheberden
- Cc msie added
- Priority changed from undecided to low
- Status changed from new to open
- Component changed from unfiled to selector
comment:2 Changed 23 months ago by rwaldron
- Priority changed from low to high
Triage confirmed. Further reduction: http://jsfiddle.net/rwaldron/bvT8W/
comment:3 Changed 23 months ago by ajpiano
- Status changed from open to closed
- Resolution set to wontfix
Thanks for your time and interest in helping out the jQuery project. While we realise this issue is irksome, we cannot advocate or support this type of querying against script tags. As the volume on this ticket indicates (and I can back up with several years of support experience), querying a script by its "text content" is not at all a common or advisable decision.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

IE6, too