withastro/astro

BUG: Search parameters with an .md extension break astro

Closed this issue · 4 comments

Astro Info

Astro                    v5.0.4
Node                     v21.1.0
System                   Linux (x64)
Package Manager          bun
Output                   static
Adapter                  none
Integrations             none

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

No response

Describe the Bug

When a page has a search parameter with a value that has a '.md' suffix, astro breaks:

image

This doesn't happen with other file extensions (as far as I've tested), only with '.md' files.

To reproduce locally, go clone this repo:
https://github.com/alarbada/astro-bug

install dependencies and go to 'http://localhost:4321/my/page?page=hello.md'. It will fail.

What's the expected result?

Astro showing the corresponding page.

Link to Minimal Reproducible Example

https://github.com/alarbada/astro-bug

Participation

  • I am willing to submit a pull request for this issue.

@alarbada can you update your reproduction? You can't have an on-demand page (prerender = false) without an adapter.

Hello @alarbada. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with needs repro will be closed if they have no activity within 3 days.

@ematipico I've reproduced it using dev

Nice thank you very much!