Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(history): Resolve the href in<base> correctly (#3819)#3823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
ichaoX wants to merge1 commit intovuejs:dev
base:dev
Choose a base branch
Loading
fromichaoX:fix_base

Conversation

ichaoX
Copy link

  • Resolve the href in<base> correctly.

  • In hash mode, the hash in base is automatically removed and the base trailing slash is distinguished.

  • By default the result ofrouter.resolve().href is the same as the actual switched URL.

Relates to:#3819,#2865

@netlify
Copy link

netlifybot commentedJan 11, 2023
edited
Loading

Deploy Preview forvue-router-docs-v3 canceled.

NameLink
🔨 Latest commit992fd4b
🔍 Latest deploy loghttps://app.netlify.com/sites/vue-router-docs-v3/deploys/646e0bb050065c00085989b1

@posva
Copy link
Member

Thanks for the PR. Can you provide a failing test or boiled-down repro? Note a base should not contain a hash

@ichaoX
Copy link
Author

ichaoX commentedJan 12, 2023
edited
Loading

An example of reproduction can be found in#3819, and you can view the source code of the Reproduction link.

Some browser extensions or proxies may modify<base>, and as a standard feature of html, it is necessary to support it correctly.

This PR should implement support for almost all legal baseURIs.
The<base> tag is then respected after ensuring the prerequisites of availability and consistency .
Supportbase.href containing relative URI or hash, even cross-origin cases.

@posva
Copy link
Member

posva commentedJan 12, 2023
edited
Loading

That base has a hash though. As I said, it cannot have a hash

@ichaoX
Copy link
Author

ichaoX commentedJan 12, 2023
edited
Loading

That reproduction link contains several mistakes at the same time:

  1. incorrect relative path
  2. incorrect hash
  3. there is an extra slash between base and hash

Additional reproduction links:

https://5s3iuf.csb.app/root/path.html

https://5s3iuf.csb.app/root/sameorigin.html

@ichaoX
Copy link
Author

@posva
Do you need any other repro?

* Resolve the href in `<base>` correctly.* In hash mode, the hash in base is automatically removed and the base trailing slash is distinguished.* By default the result of `router.resolve().href` is the same as the actual switched URL.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@posvaposvaAwaiting requested review from posva

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@ichaoX@posva

[8]ページ先頭

©2009-2025 Movatter.jp