• Resolved anzach

    (@anzach)


    Hello,

    The installation of the plugin causes an HTML Markup Validation Error.

    A script element with a src attribute must not have a type attribute whose value is anything other than the empty string, a JavaScript MIME type, or module.

    I guess this refers to the “type=”text/plain” added by the plugin.

    Any ideas?

    Thanks in advance

    A.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author webtoffee

    (@webtoffee)

    Hi @anzach,

    Greetings from Webtoffee!

    We change the type attribute value from “text/javascript” to “text/plain” in order to block the scripts and this is the reason for the validation error. However, to avoid this you can modify the script like,

    <script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXX"></script>

    to,

    <script>
    var ga_script = document.createElement('script');
    ga_script.src = "https://www.googletagmanager.com/gtag/js?id=G-XXXXXX";
    document.head.appendChild(ga_script);
    </script>
    Thread Starter anzach

    (@anzach)

    Hello

    Thank you for your valuable information

    A.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘HTML validation error’ is closed to new replies.