[wp-trac] [WordPress Trac] #11939: Make Script Elements HTML4 and XHTML compilant

WordPress Trac wp-trac at lists.automattic.com
Mon May 17 20:25:50 UTC 2010


#11939: Make Script Elements HTML4 and XHTML compilant
-----------------------------+----------------------------------------------
 Reporter:  hakre            |        Owner:                
     Type:  feature request  |       Status:  closed        
 Priority:  low              |    Milestone:  Future Release
Component:  Validation       |      Version:  3.0           
 Severity:  normal           |   Resolution:  wontfix       
 Keywords:                   |  
-----------------------------+----------------------------------------------

Comment(by azaozz):

 @hakre thanks for the lengthy explanations however it seems we are still
 talking about different things. I still don't see what bug/problem is
 fixed in the patches (or rather was fixed since you removed them).

 HTML 4 ''does not'' require script blocks to be [http://www.w3.org/TR/REC-
 html40/interact/scripts.html hidden in HTML comments]. It recommends ''a
 hack'' to [http://www.w3.org/TR/REC-html40/interact/scripts.html#h-18.3.2
 hide scripts from old browsers] (old at the time of publishing the spec,
 completely extinct now). More thoughts on that subject:
 [http://javascript.crockford.com/script.html 1],
 [http://javascript.about.com/library/blxhtml.htm 2 (last paragraph)].

 XHTML 1 ''requires'' scripts to be surrounded by `<![CDATA[...]]>`. To
 avoid problems with older browsers/JS parsers it is recommended that the
 `CDATA` tags are commented out in the JS. This is what WordPress is using
 at the moment.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11939#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list