View Single Post
Old 12-06-2012, 09:22 AM   PM User | #3
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,447
Thanks: 0
Thanked 496 Times in 488 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
You could cheat by adding the social media code from JavaScript so that it gets added after you do your validation - provided you are using HTML and not XHTML.

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.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote