Opened 5 years ago

Closed 5 years ago

#13348 closed bug (duplicate)

Tabs try to load local tab when there are username and password in the URL

Reported by: speicus Owned by:
Priority: minor Milestone: none
Component: ui.tabs Version: 1.11.4
Keywords: Cc:
Blocked by: Blocking:

Description

Steps to reproduce:

  1. Open http://uname:pass@jqueryui.com/tabs/#default.
  2. See the broken content of the first tab and three AJAX requests in Network which ought not be there.

Reproducible in Chrome 43.0.2357.130 and in Firefox 38.0.5 and probably in other browsers too.

This happens due to buggy behaviour of _isLocal(). Your compare anchorUrl with locationUrl. Problem is, when you open a URL which contains username and password, anchorUrl = "http://uname:pass@jqueryui.com/tabs/" and locationUrl = "http://jqueryui.com/tabs/". So the tab is considered to be remote and gets reloaded via AJAX.

P.S. On my website it led to infinite reloading. jQuery.tabs() script was embedded into the page, so it went on and on, fetching '#tab1' (i.e., the same page) from the server, embedding the whole HTML it into the first tab, reloading all scripts, executing again, and again, and again... Took me a while to figure it out. :)

Change History (1)

comment:1 Changed 5 years ago by Scott González

Resolution: duplicate
Status: newclosed

Duplicate of #11223.

Note: See TracTickets for help on using tickets.