jamesseanwright / valimate

Automated HTML validation via Node.js
29 stars 3 forks source link

Escape validate on customer attribute of tags #9

Closed Nguonchhay closed 7 years ago

Nguonchhay commented 7 years ago

I integrate the facebook like button. That plugin add extra attribute fb:like:layout in tag a. As the result, the valimate displays:

jamesseanwright commented 7 years ago

Hi,

I've just attempted to emulate this by directly submitting the following markup to W3's Nu checker instance:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>Test</title>
    </head>
    <body>
        <h1>Test</h1>

        <div class="addthis_toolbox addthis_default_style ">
            <a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
        </div>
    </body>
</html>

This results in the error you've mentioned, but this is because fb:like:layout is not a valid attribute for <a> elements. Therefore, this is not an issue with Valimate. If possible, you should use an alternative plugin that generates valid markup.