[Snippet] AddThis does not pass HTML 5 Validation

AddThis is a popular social sharing widget to dump on your site. Shame it doesn’t pass HTML 5 validation.
I was getting the following errors
Attribute addthis:url is not serializable as XML 1.0.
Attribute addthis:title is not serializable as XML 1.0.
Attribute addthis:description is not serializable as XML 1.0.
Attribute addthis:url not allowed on element div at this point.
Attribute addthis:title not allowed on element div at this point.
Attribute fb:like:layout is not serializable as XML 1.0.
Attribute fb:like:layout not allowed on element a at this point.
The line in question was the Facebook Like button

[codesyntax lang=”html4strict”]
<a class=”addthis_button_facebook_like” fb:like:layout=”button_count”></a>

To fix this you can actually remove fb:like:layout=”button_count” as “Button Count” is the default behaviour anyway.

[codesyntax lang=”html4strict”]
<a class=”addthis_button_facebook_like” ></a>

since button count is the default layout.

Author: Kieran Barnes

Kieran is a PHP developer with 15 years commercial experience. Specialist in WordPress, CakePHP, CubeCart and all things PHP.

Leave a Reply

Your email address will not be published. Required fields are marked *