Skip to content

Expressions in <head> causes elements to end up in <body> #985

@donnikitos

Description

@donnikitos

Astro Info

Astro                    v4.5.5
Node                     v21.6.2
System                   Linux (x64)
Package Manager          bun
Output                   static
Adapter                  none
Integrations             @astrojs/tailwind
                         @astrojs/preact
                         astro-reroute

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:
image
image

<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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs reproIssue needs a reproductionneeds triageIssue needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions