fix(webserver): move <script> blocks inside <head> in default template - #84
Merged
Merged
Conversation
Five pages of the default web template closed <head> and then emitted a <script> block before opening <body>, which is invalid HTML (no content is allowed between </head> and <body>). Browsers recover by reparenting the script, but it is a parse error and a trap for further markup work. Move the closing </head> tag to after the script block so the scripts are declared inside <head>, in: - amuleweb-main-dload.php - amuleweb-main-search.php - amuleweb-main-shared.php - amuleweb-main-prefs.php - amuleweb-main-stats.php footer.php and amuleweb-main-log.php had the same problem but were already fixed as a side effect of earlier commits removing their misplaced script blocks entirely. No script content was changed; this is a purely structural fix. Verified against a running amuleweb: every affected page now serves </head> immediately before <body> and renders unchanged.
ngosang
force-pushed
the
fix/script-outside-head
branch
from
June 11, 2026 08:38
04b9164 to
3020a9e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Seven pages of the default web template closed and then emitted a <script> block before opening , which is invalid HTML (no content is allowed between and ). Browsers recover by reparenting the script, but it is a parse error and a trap for further markup work.
Move the closing tag to after the script block so the scripts are declared inside , in:
No script content was changed; this is a purely structural fix. Verified
against a running amuleweb: every affected page now serves
immediately before and renders unchanged.