Opened 6 years ago

Closed 6 years ago

#15077 closed bug (duplicate)

ui.tabs tries to insert the page into itself if the page has a <base> tag

Reported by: François REMY Owned by:
Priority: minor Milestone: none
Component: ui.tabs Version: git (not yet released)
Keywords: Cc:
Blocked by: Blocking:

Description

Create a page with a <base href="http://..."> tag to another domain. Inside, create a tab bar containing at least one tab link, pointing to elements using <a .... href="#id">.

When you load the page, you should see a request being made to the base domain, then fails due to CORS restrictions. This request should not happen.

In Edge, things are worse because the request does succeed (we don't apply the <base> tag for the special-cased "" url) and the page is inserted into itself recursively, until the page becomes unusable.

You can view this behavior on: http://kibrisgazetesi.com/

It would be great to fix this bug in the _isLocal function by making sure that if the anchor.getAttribute('href').substr(0,1) is equal to '#', then the url is always considered local (to avoid <base> tag issues).

The code is in: https://github.com/jquery/jquery-ui/blob/master/ui/widgets/tabs.js#L80

Change History (2)

comment:2 Changed 6 years ago by Scott González

Resolution: duplicate
Status: newclosed

Duplicate of #7822.

Note: See TracTickets for help on using tickets.