I just upgraded everything and now I have this AMP validation error. How can I resolve this?
Error code
DISALLOWED_TAG
Invalid markup
<script … >
Element attributes
id generate-a11y
Element name
script
Parent element
body
Text content
!function(){__DOUBLE_QUOTED_STRING__;if(__DOUBLE_QUOTED_STRING__in document&&__DOUBLE_QUOTED_STRING__in window){var e=document.body;e.addEventListener(__DOUBLE_QUOTED_STRING__,function(){e.classList.add(__DOUBLE_QUOTED_STRING__)}),e.addEventListener(__DOUBLE_QUOTED_STRING__,function(){e.classList.remove(__DOUBLE_QUOTED_STRING__)})}}();
Sources
#1 Type: Theme
Name: GeneratePress (generatepress)
Function: generate_do_a11y_scripts()
Action: wp_footer (priority 10)
Location: inc/general.php:453
Details are:
* @since 3.1.0
*/
function generate_do_a11y_scripts() {
if ( apply_filters( ‘generate_print_a11y_script’, true ) ) {
// Add our small a11y script inline.
printf(
‘<script id=”generate-a11y”>%s</script>’,
‘!function(){“use strict”;if(“querySelector”in document&&”addEventListener”in window){var e=document.body;e.addEventListener(“mousedown”,function(){e.classList.add(“using-mouse”)}),e.addEventListener(“keydown”,function(){e.classList.remove(“using-mouse”)})}}();’
);
}
}