Hi,
I found out that Google +1 buttons don't pass the w3c validator test.
I get a great amount of errors.
Do you have a solution to solve it? Maybe use google code inside javascript?
Help please.
Hi,
I found out that Google +1 buttons don't pass the w3c validator test.
I get a great amount of errors.
Do you have a solution to solve it? Maybe use google code inside javascript?
Help please.
Comments
Comment #1
jscm commentedComment #2
corbacho commentedIf you choose the HTML5 syntax, it should pass the W3C HTML5 validator.
About the XHTML... no. It's sad yes. But I've to say that most if not all of the social widgets are not very respectful with the W3C standards.
In any case, it's something I can't solve. This module is a mere "glue", it's Google business.
Read more in Google Webmasters forum (search about w3c) http://www.google.com/support/webmasters/bin/search.py?hl=en&forum=1&que...
Comment #3
jscm commentedif you use g+ code inside javascript, do you think it could be work?
I read that using fb like button inside javascript the w3c validator check it with success.
Comment #4
corbacho commentedI googled about it and maybe wrapping the button tag inside ![CDATA[ ]] tags could make the trick.
I don't promise anything.. but I will test and try to do it this week.
If you know theming.. you can do it yourself, overriding the theme function of the module and give me feedback?
Comment #5
jscm commentedI don't know how theming using drupal "hooks" ... I could try inserting g+ code with javascript inside theme.
Comment #6
jscm commentedI found out this:
But the tag data-lang or simply lang don't pass w3c validator check
Comment #7
jscm commentedThis is good!
http://www.google.com/support/forum/p/Webmasters/thread?tid=2a55d3d91cac...
Comment #8
rupamguha commentedfor w3c validation for google+, facebook api or twitter plugin you can user javascript document.write covered by xml CDATA.
please find the following link for more details script,
http://www.newtechtips.org/tips-and-tricks-to-validate-w3c-for-facebook-...
Comment #9
corbacho commentedI want to remind that is W3C-HTML5 valid (choosing the setting in the admin options).
But it's not XHTML valid.
Related:
http://stackoverflow.com/questions/6217434/google-1-button-not-w3c-compl...
And I'm not willing to put hacks using "document.write", also because this function is considered bad practice and can give collateral problems.
Google has decided to make it non XHTML-valid. Accept it and explain it to your customers.
The duty of this module is to serve it as it is.
Notice also that the rendering of the button format is inside a theme_ function. So you can override in your theme template.php if you want.