Forums

[resolved] wp-includes widgets validation error (3 posts)

  1. Nurice
    Member
    Posted 4 years ago #

    I'm getting a couple of W3C validation errors on my site and I traced them to WP-includes/widgets.php. This only occurs when I use the categories widget with "Show as dropdown" checked. From widgets.php:

    <script lang='javascript'><!--
        var dropdown = document.getElementById("cat");
        function onCatChange() {
    		if ( dropdown.options[dropdown.selectedIndex].value > 0 ) {
    			location.href = "<?php echo get_option('home'); ?>/?cat="+dropdown.options[dropdown.selectedIndex].value;
    		}
        }
        dropdown.onchange = onCatChange;
    --></script>

    W3C says need to change <script lang='javascript'> to <type="text/javascript">. I've done that many times with other js errors and it always clears stuff up. But WordPress files are sacred ground for me. I don't fool with them unless you guys tell me it is safe. I know the folks who worked on the 2.3 version are the best.

    Could someone please try a validation of my site and tell me if this is really an error in the wp file or something on my site:
    http://www.eyesapart.com/

    and the validator is here:
    http://validator.w3.org/

    Thanks,
    Lois

  2. MichaelH
    Volunteer
    Posted 4 years ago #

    I believe this has been reported via Trac Ticket 5168, and there is a patch.

  3. Nurice
    Member
    Posted 4 years ago #

    This is the first I've heard of Trac Tickets, but thanks very much for the link. I'll get the patch in place!

Topic Closed

This topic has been closed to new replies.

About this Topic