Support » Plugins » [Plugin: NextGen-Gallery] HTML5 errors

  • I got two w3c HTML5 validation errors on my site while the nextgen-gallery slideshow widget was activated in my 2010 child theme. Below are the errors and the fixes I did so that my site is in the green at w3c:

    1. Bad value … for attribute src on element img: DOUBLE_WHITESPACE in PATH.

    …loader.gif ” alt=”” />

    Syntax of IRI reference:
    Any URL. For example: /hello, #canvas, or Spaces should be escaped as %20.

    Fix: remove space in line 120 of nggfunctions.php.
    old — $out .= “\n”. ‘<img src=”‘. NGGALLERY_URLPATH . ‘images/loader.gif ” alt=”” />’;
    new — $out .= “\n”. ‘<img src=”‘. NGGALLERY_URLPATH . ‘images/loader.gif” alt=”” />’;

    2. Error Line 128, Column 45: Required attributes missing on element script.

    <script type=”text/javascript” defer=”defer”>

    Fix (line 123 of nggfunctions.php:
    old — $out .= “\n”.'<script type=”text/javascript” defer=”defer”>’;
    new — $out .= “\n”.'<script type=”text/javascript”>’;

    The page with the widget activated loaded as expected in firefox, opera, and IE6 with the changes.

  • The topic ‘[Plugin: NextGen-Gallery] HTML5 errors’ is closed to new replies.