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.
Helping others to solve their computer problem at http://www.felgall.com/