Bug Tracker

Ticket #4967: jquery123.decodeURIComponent.patch

File jquery123.decodeURIComponent.patch, 767 bytes (added by jnorell, 12 years ago)

fix for map( [], decodeURIComponent) error in testrunner.js

  • test/qunit/testrunner.js

    old new  
    197197    return innerEquiv;
    198198}(); // equiv
    199199
    200 var GETParams = $.map( location.search.slice(1).split('&'), decodeURIComponent ),
     200// decodeURIComponent only takes a single argument, but map() calls it with two.
     201// this is a workaround (hence "wa")
     202function decodeURIComponent_wa(uri, junk) { return decodeURIComponent(uri); };
     203
     204//var GETParams = $.map( location.search.slice(1).split('&'), decodeURIComponent ),
     205var GETParams = $.map( location.search.slice(1).split('&'), decodeURIComponent_wa ),
    201206        ngindex = $.inArray("noglobals", GETParams),
    202207        noglobals = ngindex !== -1;
    203208