WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Digg Digg] Fix to HTML5 validator warning concerning CSS link

[Plugin: Digg Digg] Fix to HTML5 validator warning concerning CSS link

  • Dartanjan
    Member

    @dartanjan

    This isn’t something critical, but I noticed there is a Warning on HTML5 validator when DD plugin is used. The warning is:

    Bad value ***plugins/digg-digg/include/../css/diggdigg-style.css?ver=5.2.9 for attribute href on element link: Path component contains a segment /../ not at the beginning of a relative reference, or it contains a /./. These should be removed.

    Function dd_output_css_to_html() (Line 102 of dd-helper.php) writes the CSS link, like so:

    echo '<link rel="stylesheet" href="' . DD_PLUGIN_URL . '../css/diggdigg-style.css?ver=' . DD_VERSION . '" type="text/css" media="screen" />';

    To fix the warning, dirname the DD_PLUGIN_URL constant and remove the ‘..’ like this:

    echo '<link rel="stylesheet" href="' . dirname(DD_PLUGIN_URL) . '/css/diggdigg-style.css?ver=' . DD_VERSION . '" type="text/css" media="screen" />';

    Nothing much, but just in case you want to get rid of that warning 🙂

    http://wordpress.org/extend/plugins/digg-digg/

  • The topic ‘[Plugin: Digg Digg] Fix to HTML5 validator warning concerning CSS link’ is closed to new replies.