Make WordPress Core

Changeset 32503


Ignore:
Timestamp:
05/13/2015 09:41:47 PM (11 years ago)
Author:
wonderboymusic
Message:

In tb_show() in thickbox, when loading content into #TB_ajaxContent, make sure a URL with no ? doesn't break when &random= is appended to it.

Thickbox hasn't been updated since 2007, just FYI.

Fixes #31726.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/thickbox/thickbox.js

    r30376 r32503  
    232232                    jQuery("#TB_window").css({'visibility':'visible'});
    233233                }else{
    234                     jQuery("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method
     234                    var load_url = url;
     235                    load_url += -1 === url.indexOf('?') ? '?' : '&';
     236                    jQuery("#TB_ajaxContent").load(load_url += "random=" + (new Date().getTime()),function(){//to do a post change this load method
    235237                        tb_position();
    236238                        jQuery("#TB_load").remove();
Note: See TracChangeset for help on using the changeset viewer.