• Resolved pixelworx

    (@pixelworx)


    Hi! I’ve run into one small problem with the plugin, in that, when it is activated, I get a validation error with W3C for the line;

    <script type='text/javascript' src=''></script>

    which gives the error;

    Line 200, Column 38: Bad value for attribute src on element script: Must be non-empty.
    <script type='text/javascript' src=''></script>
    Syntax of IRI reference:
    Any URL. For example: /hello, #canvas, or http://example.org/. Characters should be represented in NFC and spaces should be escaped as %20.

    – caused, seemingly by the empty src tag in this line. Wee question, where is this line generated from (i.e. which plugin file) and why? It doesn’t seem to do anything, does it?

    Can it be removed and the plugin still function correctly, or….?

    It’s not a HUGE deal, but i’m trying to make sure all my code is clean and standard, so i’d very much like to solve this problem 🙂

    Thanks in advance,

    Joe

    http://wordpress.org/extend/plugins/facebook/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Niall Kennedy

    (@niallkennedy)

    The Facebook JavaScript SDK typically loads from an asynchronous snippet that allows the rendering of Facebook social plugins to get out of the way and become almost the last thing loaded on the page. WordPress prefers enqueued scripts, registering a handle and an associated script destination to prevent duplicate loading of scripts by other plugins and generally log resource loading. Some countries block Facebook, which could interfere with loading your page (or a similar effect if the script took a long time to retrieve from a server).

    The Facebook plugin for WordPress intercepts output of an enqueued script element, replacing a blocking script with a async loading snippet. A ticket was filed in WordPress Core to clear out the resulting empty src attribute.
    http://core.trac.wordpress.org/ticket/22470

    Thread Starter pixelworx

    (@pixelworx)

    Bingo! That change has solved it! Validating 100% as HTML5! Many thanks for your help! #genius

    Regards,

    Joe

    Plugin Contributor Niall Kennedy

    (@niallkennedy)

    Patched in the next version of WordPress.
    http://core.trac.wordpress.org/changeset/25465

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘W3C Validation Error caused my empty 'src' tag generated by plugin.’ is closed to new replies.