Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
12-04-2012, 02:41 AM #1
Chronic validators, how do you validate errors from social media buttons?
My site is totally validated, except for 13 errors and 2 warnings caused by the code provided to me by Facebook and Twitter for their "Like" and "Follow" buttons. How do you validation die-hards get around this?
12-06-2012, 04:42 AM #2
- Join Date
- Jul 2009
- Thanked 3 Times in 3 Posts
I don't think you're going to like the answer. You don't have control over social plugins at all. So you can't edit their code to successfully validate it.
To be honest, I'd take the validation results with a grain of salt. So long as you don't commit any major crimes, all those CSS errors and "divs don't belong here" don't really hurt anything.
12-06-2012, 09:22 AM #3
- Join Date
- Sep 2005
- Sydney, Australia
- Thanked 932 Times in 919 Posts
That doesn't make their garbage into HTML but it does at least get rid of the errors relating to their garbage from the HTML that you are validating (which is effectively that part of your page that isn't their code).
Google provide a valid variant for their +1 links, with Facebook their like link is valid HTML and just needs a / added if you are using XHTML. The Twitter tweet button has two invalid attributes but the rest is valid.
With XHTML the invalid garbage would stop the page displaying so you would have to rewrite their code to be valid in order to use it.