When validating any of my sites's pages (http://ulf.kister.org/) by http://validator.w3.org/check?uri=referer the W3C validation service reports errors caused by the script tags inside the page's body.
Solution would probably be placing the script code inside the page header...
Comments
Comment #1
hass commentedNext version allows switching to header, but this is not supported by google and us, too.
Your footer codes gets invalid, while you made it invalid yourself.
Comment #2
prof_stoopid commentedObsoleted by #1
Placing the script in the page's footer is probably smart by means of
- minimizing rendering delay
- registering only "real" page views where the user's browser has reliably at least loaded and rendered he whole page
therefore an optional placement inside the header and some explanatory words about the pros and cons of this option would do the trick even better...
Comment #3
prof_stoopid commented> while you made it invalid yourself.
What do you mean? How to avoid??
Comment #4
hass commentedComment #5
hass commentedYou placed script tags inside script tags, this makes the code invalid. Have you used "JavaScript Code" to add you own code? Read the docs below this text area...
Comment #6
prof_stoopid commentedStoopid me (my nick seems to be my manifesto :-). This solved the XHMTL 1.0 issue.
Thank you so much for the quick analysis and fix!
Comment #7
hass commentedI'm moving this into a feature request.
We should validate if contend added into "JavaScript Code" section contains script tags.
Comment #8
prof_stoopid commentedThis would at least make it a little more fool proof for users like me ;-)
Thanks again for the incredibly quick answers and assistence!
Comment #9
hass commentedOnly for me... why are you adding ga.js twice? You should really REMOVE all your code added into the "JavaScript Code" text area.
Comment #10
hass commentedDE: Sach mal... was machst Du da eigentlich? :-) Du musst in das JavaScript Feld *nichts* eingeben damit das Modul einwandfrei arbeitet! Man braucht dieses Textfeld nur für sehr wenige Spezialfälle... aktuell trackst Du jede Seite 2 mal.
Comment #11
prof_stoopid commented> why are you adding ga.js twice?
By mistake, i must admit. Fixed nox.
Thank you again!
Comment #12
reli4nt commentedThe script tags should be escaped and that will allow them to validate.
This is considered proper form and the safest way to include JavaScript in an (x)HTML document.
Comment #13
hass commented@reli4nt: no, the code inserted into the text area should not have any script tags at all. We need a regex testing for
<script>$on the end and the same one the beginning or better - there should be no script tag at all. I can think about some edge cases where this might limit somebody, but it's the only save way.Comment #14
hass commentedComment #15
hass commentedSolved in D5 and D6.
Comment #16
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.