Enabling "Enable JavaScript + CSS + Noscript protection" causes invalid HTML

Created on 27 June 2019, over 5 years ago
Updated 19 September 2024, 2 months ago

Problem/Motivation

When you enable the field "Enable JavaScript + CSS + Noscript protection", it injects a bit of code into the head of the document. Included in that code is a div around some text. When the page is checked for valid HTML using the W3C validator, it causes the error "Bad start tag in div in noscript in head." since the div tag is not allowed in the head of the document, but is required for proper styling.

Proposed resolution

Split the code and the message, and add the message as the first child of the body tag, where div tags are allowed.

Remaining tasks

Reviews needed

User interface changes

None

API changes

None

Data model changes

None

🐛 Bug report
Status

Needs work

Version

2.0

Component

Code

Created by

🇺🇸United States averagejoe3000 Swanzey, NH

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024