Reputation: 162
I've got Google+ button on my site. It works fine, but W3C validator shows error:
The text content of element script was not in the required format: Expected space, tab, newline, or slash but found < instead.
Here is the code:
<script src="https://apis.google.com/js/platform.js" async defer>lang:"pl";</script>
How can I fix this?
Upvotes: 0
Views: 320
Reputation: 272106
The W3C validator is complaining about the contents of <script src...>
tag. According to these specs, a script tag with src
attribute can only contain whitespace and/or JavaScript comments.
You can use the following syntax instead:
<script>
window.___gcfg = { lang: "pl" };
</script>
<script src="https://apis.google.com/js/platform.js" async defer></script>
Upvotes: 4