Astro Info
Astro v5.13.5
Node v22.18.0
System Windows (x64)
Package Manager pnpm
Output static
Adapter none
Integrations none
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Plain text and any content after that (JS expression included) in <title>{script}text...</title> inside <head></head> leaks into <body></body> if there was no space between {expr} and text.
For instance, with <title>{name}'s blog {expr}</title>, the 's blog [expr content] turns out at the beginning of <body></body> instead of <head></head>. However, astro works correctly with <title>{name} blog</title>, <title>{name}{title}</title> or <title>my{name}</title>.
What's the expected result?
All the contents written in <title></title> should show up in tab titles instead of ending up in the body part and being rendered as page contents, regardless of whether a space was placed between JS expression and plain text or not.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-pywaozvi?file=src%2Fpages%2Findex.astro
Participation