Ticket #946 (closed enhancement: wontfix)
Occurrence of // in strings in jquery.js causes problems with idiotic JS-filters
| Reported by: | warp@… | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.2.4 |
| Component: | core | Version: | |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description (last modified by flesler) (diff)
Some German cell-phone internet providers obviously employ absolutely stupid transparent proxies which filter .js Files to decrease the download size and seem to cut off everything in JS sources after . jQuery's XPath Code contains the following line:
if ( !t.indexOf("") ) {
I wonder if this could maybe be rewritten to something like
if( !t.indexOf("/"+"/")) {
or maybe
if( !t.indexOf("")) {
(I know, this is strictly speaking not a problem in jQuery itself, but it would be an easy work-around to not trigger such a filter. We already told the affected users to contact the cell phone provider, but it's not clear whether this will help)
Change History
comment:2 Changed 5 years ago by Eli-D
Worthy to note, the defer hack is no longer used in bindReady().
The only instance of "" I found is in ajax():
// If we're requesting a remote document
// and trying to load JSON or Script with a GET
if ( (!s.url.indexOf("http") || !s.url.indexOf("//")) && ( s.dataType == "script" || s.dataType =="json" ) && s.type.toLowerCase() == "get" ) {
comment:3 Changed 5 years ago by flesler
- need set to Review
- Status changed from new to closed
- Resolution set to wontfix
- Description modified (diff)
- Milestone set to 1.2.4
The ajax case is now gone, a regex is used which has a: '...\/\/...'. As for the XPath, it's no longer supported.
This seems to be accidentally fixed. Please reopen if you another occurrence of and we'll see how to deal with it.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

The problem is worse than originally thought. Not only E-Plus filters Javascript this way, also Vodafone Germany does it.
Also, at least one other part of jQuery which is affected is the IE script defer hack:
Changing src=: to src= seems to work around the problems.
This should _really_ be fixed in the standard distribution, especially as it's an easy to use fix which will avoid problems for many people.