{"record":{"id":"4d75df33dcf4f364","repo":"swc-project/swc","slug":"nonspacecharacterinnoscriptinhead","errorCode":"NonSpaceCharacterInNoscriptInHead","errorMessage":"Non-space character inside \"noscript\" inside \"head\"","messagePattern":"Non-space character inside \"noscript\" inside \"head\"","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"crates/swc_html_parser/src/parser/mod.rs","lineNumber":1985,"sourceCode":"                    //\n                    // Pop the current node (which will be the head element) off the stack of open\n                    // elements.\n                    //\n                    // Switch the insertion mode to \"after head\".\n                    //\n                    // Reprocess the token.\n                    _ => {\n                        anything_else(self, token_and_info)?;\n                    }\n                }\n            }\n            // The \"in head noscript\" insertion mode\n            InsertionMode::InHeadNoScript => {\n                let anything_else =\n                    |parser: &mut Parser<I>, token_and_info: &mut TokenAndInfo| -> PResult<()> {\n                        match &token_and_info.token {\n                            Token::Character { .. } => {\n                                parser.errors.push(Error::new(\n                                    token_and_info.span,\n                                    ErrorKind::NonSpaceCharacterInNoscriptInHead,\n                                ));\n                            }\n                            Token::StartTag { tag_name, .. } => {\n                                parser.errors.push(Error::new(\n                                    token_and_info.span,\n                                    ErrorKind::BadStartTagInNoscriptInHead(tag_name.clone()),\n                                ));\n                            }\n                            Token::EndTag { tag_name, .. } => {\n                                parser.errors.push(Error::new(\n                                    token_and_info.span,\n                                    ErrorKind::StrayEndTag(tag_name.clone()),\n                                ));\n                            }\n                            Token::Eof => {\n                                parser.errors.push(Error::new(","sourceCodeStart":1967,"sourceCodeEnd":2003,"githubUrl":"https://github.com/swc-project/swc/blob/5176682b65416c6b5de6b47379ae1588ea3ecb3f/crates/swc_html_parser/src/parser/mod.rs#L1967-L2003","documentation":"HTML parse error in the 'in head noscript' insertion mode (with scripting enabled): a character token that is not whitespace was encountered while only whitespace, comments and a few head elements are allowed; recorded on parser.errors and the token is otherwise handled by the anything-else recovery path.","triggerScenarios":"Thrown at crates/swc_html_parser/src/parser/mod.rs:1985 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Move non-whitespace content out of <noscript> in <head> into the body","Restructure the document so <noscript> only appears where flow content is permitted"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5176682b65416c6b5de6b47379ae1588ea3ecb3f","analyzedAt":"2026-08-17T16:16:52.067Z","contentChangedAt":"2026-08-17T16:16:52.067Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}