What steps will reproduce the problem?
1. Write a small script and place it in an external .js file
2. View the source of the page and see the small script placed in the head
section of the page instead of in the external .js file
3. Validate the page with an XHTML strict doctype and view errors
What version of the product are you using (please check X-Mod-Pagespeed
header)?
0.9.10.1-250
On what operating system?
CentOS 5.5
Which version of Apache?
2.2.3
Which MPM?
prefork
Please provide any additional information below, especially a URL or an
HTML file that exhibits the problem.
This is happening on a site I am currently developing for a client. I recently
put the site up yesterday "as is" so the client could see it. I went to do some
validation checking today and noticed this problem. Here's the URL:
http://wemakeitrun.com/accounting2web/
Originally, I had all the javascript that's now in the head section in an
external file called main.js.
I assume it's breaking validation because it doesn't have the proper <!-- //
--> or the CDATA tag around it...
Original issue reported on code.google.com by aaronjwood on 2 Dec 2010 at 4:29
The text was updated successfully, but these errors were encountered:
Your right. It appears that strict XHTML does not allow inline scripts unless
they are (A) escaped or (B) surrounded by CDATA[[ ]].
Matthew, could you look into this. We could either turn off inlining JS for
XHTML or just add the //CDATA tags as suggested here:
http://lachy.id.au/log/2006/11/xhtml-script .
Original comment by sligocki@google.com on 3 Dec 2010 at 10:45
Original issue reported on code.google.com by
aaronjwood
on 2 Dec 2010 at 4:29The text was updated successfully, but these errors were encountered: