Skip to content

Fix base href for non http/https protocols#304

Closed
ykulynych wants to merge 1 commit intoui-router:masterfrom
ykulynych:fix-base-href-for-non-http/https-protocols
Closed

Fix base href for non http/https protocols#304
ykulynych wants to merge 1 commit intoui-router:masterfrom
ykulynych:fix-base-href-for-non-http/https-protocols

Conversation

@ykulynych
Copy link
Copy Markdown

Base href is incorrect for Google Chrome extensions.

Expected: "/baseHref/"
Result: "chrome-extension://cckppebifaokhmbkciccdindfbmacjcj/baseHref/"

Fixed getBaseHref function:
return new URL(baseTag.href).pathname instead return baseTag.href.replace(/^(https?:)?//[^/]*/, '')

@christopherthielen
Copy link
Copy Markdown
Member

Unfortunately, new URL() is not supported in IE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants