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

nested dynamic routing can't work with encode URL #11557

Closed
1 task
loveloki opened this issue Jul 26, 2024 · 2 comments
Closed
1 task

nested dynamic routing can't work with encode URL #11557

loveloki opened this issue Jul 26, 2024 · 2 comments
Assignees
Labels
needs triage Issue needs to be triaged

Comments

@loveloki
Copy link

Astro Info

Astro                    v4.12.2
Node                     v18.20.3
System                   Linux (x64)
Package Manager          unknown
Output                   server
Adapter                  none
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

Nested dynamic routing using on-demand rendering mode via output: 'server' cannot work with encoded URLs.

config:

export default defineConfig({
  output: 'server',
});

image

What's the expected result?

Nested dynamic routing can work with encode URL

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-tu5dpb?file=src%2Fpages%2F%5Bid%5D%2F%5Blink%5D.astro

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Jul 26, 2024
@ascorbic ascorbic self-assigned this Jul 29, 2024
@ascorbic
Copy link
Contributor

I'm closing this as a duplicate of #8516. I think I have a fix, but it would be a breaking change so would probably need to wait for Astro 5. I'll go into a bit more detail in the other issue. The ugly workaround would be to double-encode it: const astro = encodeURIComponent(encodeURIComponent('https://astro.build'))

@loveloki
Copy link
Author

I'm closing this as a duplicate of #8516. I think I have a fix, but it would be a breaking change so would probably need to wait for Astro 5. I'll go into a bit more detail in the other issue. The ugly workaround would be to double-encode it: 我将其作为以下副本关闭 #8516 。我想我已经解决了,但这将是一个重大更改,因此可能需要等待 Astro 5。我将在另一期中详细介绍。丑陋的解决方法是对其进行双重编码:const astro = encodeURIComponent(encodeURIComponent('https://astro.build'))

thanks! It's a temporary method available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants