simply-static
simply-static copied to clipboard
<div> in <head> causes loss of <body> attributes
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.