Invalid Inline Script
-
When I create a new post, and before I publish it, I always get this error in the AMP Validation:
{
"node_name": "script",
"parent_name": "head",
"code": "DISALLOWED_TAG",
"type": "js_error",
"node_attributes": [],
"text": "\n\t( function() {\n\t\tvar query = document.location.search;\n\n\t\tif ( query && query.indexOf( SINGLE_QUOTED_STRING ) !== INT ) {\n\t\t\twindow.name = SINGLE_QUOTED_STRING;\n\t\t}\n\n\t\tif ( window.addEventListener ) {\n\t\t\twindow.addEventListener( SINGLE_QUOTED_STRING, function() { window.name = SINGLE_QUOTED_STRING; } );\n\t\t}\n\t}());\n\t\n",
"node_type": "ELEMENT",
"sources": [
{
"type": "core",
"name": "wp-includes",
"file": "functions.php",
"line": 7596,
"function": "wp_post_preview_js",
"hook": "wp_head",
"priority": 1
}
],
"removed": true,
"reviewed": true
}The plugin solves this problem by removing the script (thus the published version shows no AMP errors). Is there a way to solve this problem before publishing? Is it even important if it is being excluded?
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Invalid Inline Script’ is closed to new replies.