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

<div> in <head> causes loss of <body> attributes #257

Open
half-duplex opened this issue Sep 24, 2024 · 0 comments
Open

<div> in <head> causes loss of <body> attributes #257

half-duplex opened this issue Sep 24, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@half-duplex
Copy link

Using Simply Static v3.1.9.
A broken theme was causing output like this:

<html>
  <head>
    [...]
    <div style="display:none;">[some debugging garbage]</div>
    [...]
  </head>
  <body class="a bunch of important classes">
    [...]

It seems like static conversion does some linting, since it output:

<html>
  <head>
    [...]
  </head>
  <body>
    <div style="display:none;">[some debugging garbage]</div>
    [...]

The lack of the CSS classes on the body caused significant breakage in the resulting static site.
It seems to leave the tags following the bad div alone, which in my case was fine but in some cases like may not be handled well.

I'm not sure if invalid HTML like this is common enough case to be worth fixing, but if not, even an "Invalid HTML" warning would have saved me a good amount of confusion and thinking the plugin was broken.

@patrickposner patrickposner self-assigned this Oct 22, 2024
@patrickposner patrickposner added the bug Something isn't working label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants