Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: unicode path html entry point (#5821) #5823

Merged
merged 5 commits into from
Nov 25, 2021

Conversation

yArna
Copy link
Contributor

@yArna yArna commented Nov 24, 2021

Description

fixes #5821

Does not work when the path to the entry point has Unicode characters,will cause a 404 error

such as Chinese character folders,when accessing the entry page in the browser at development time

├── 中文
│   └── index.html
└── にほんご
    └── index.html

image

image

this PR use decodeURIComponent() to handle the received file path

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@Shinigami92 Shinigami92 added the p3-minor-bug An edge case that only affects very specific usage (priority) label Nov 24, 2021
@Shinigami92 Shinigami92 self-requested a review November 24, 2021 13:35
@patak-dev
Copy link
Member

Thanks for the PR @yArna and the clear repro and linked issue! Would it be possible to add a test case in one of the playgrounds to the PR so we avoid future regressions? There is info about extending Vite's e2e test suite here https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md#extending-the-test-suite

@yArna
Copy link
Contributor Author

yArna commented Nov 24, 2021

Thanks for the PR @yArna and the clear repro and linked issue! Would it be possible to add a test case in one of the playgrounds to the PR so we avoid future regressions? There is info about extending Vite's e2e test suite here https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md#extending-the-test-suite

Okay, I'll add it later.

@patak-dev patak-dev merged commit 2048195 into vitejs:main Nov 25, 2021
@patak-dev
Copy link
Member

Nice! Thanks for adding the test case too

@yArna
Copy link
Contributor Author

yArna commented Nov 25, 2021

Glad to contribute to this project 🥳

@patak-dev patak-dev mentioned this pull request May 11, 2022
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: html p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Development Server does not work when the path to the entry point has Unicode characters
4 participants