-
Notifications
You must be signed in to change notification settings - Fork 62
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
Expressions in <head>
causes elements to end up in <body>
#985
Comments
Hello @donnikitos. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with |
It seems that some of the tags are misplaced to {<title>{...}</title>} |
@donnikitos After playing around with the reproduction repo, I think I might have found a workaround: wrapping <Fragment>{meta?.title && <title>{meta.title}</title>}</Fragment> |
<head>
causes elements to end up in <body>
@MoustaphaDev should merge #982 he thinks is related to this. |
@Princesseuh Can priority level be urgent? Can't upgrade after 4.2.1 because everything break. |
This simple example doesn't reproduce: https://stackblitz.com/edit/github-pfaayw?file=src%2Fpages%2Findex.astro Can anyone come up with a minimal repro at the level with it? |
I add this inside
|
I updated this demo to use that: https://stackblitz.com/edit/github-pfaayw?file=src%2Fpages%2Findex.astro,package.json Still in the head. Can you adjust my demo to get it to break? |
I was able to reproduce it down with this: https://stackblitz.com/edit/github-pfaayw-axdvrr?file=src%2Fpages%2Findex.astro,package.json |
Unfortunately that PR breaks a bunch of tests in core. There might be a way to fix this issue differently, though. |
Pretty sure this is the culprit: 14ccba5 |
I need to test against core, but hopefully this does it: #990 |
If test pass will PR be in next astro release? |
I'll create a preview release and have a few people test it. But yes, it will be soon (probably next week) if everything looks ok. |
@cdtut you can test by install I tested with this demo, which is fixed now: https://stackblitz.com/edit/github-pfaayw-axdvrr?file=src%2Fpages%2Findex.astro,package.json |
@matthewp's fix works for my case 😄. |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
Chrome, Chromium, Firefox
Describe the Bug
Updated Astro from 4.0.8 to latest 4.5.4 and suddenly browsers receive files with broken utf-8 characters:
<meta charset="UTF-8" />
is set.Input files are encoded in proper UTF-8 charset.
For now my only solution for deployment is to enforce UTF-8 via .htaccess headers.
Dev server still displays broken characters.
What's the expected result?
During development and after build non-ASCI character should be properly encoded.
For example:
ö
should beö
ü
should beü
Link to Minimal Reproducible Example
https://github.com/donnikitos/astro-utf-bug
Participation
The text was updated successfully, but these errors were encountered: