Search and Top Navigation
#15077 closed bug (duplicate)
Opened October 10, 2016 11:37PM UTC
Closed October 11, 2016 12:08AM UTC
ui.tabs tries to insert the page into itself if the page has a <base> tag
Reported by: | FremyCompany | 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:
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
https://github.com/jquery/jquery-ui/pull/1758