[wp-trac] [WordPress Trac] #9415: TinyMCE breaks <script> tags in XHTML and E4X

WordPress Trac wp-trac at lists.automattic.com
Sun Mar 29 17:15:38 GMT 2009


#9415: TinyMCE breaks <script> tags in XHTML and E4X
--------------------------+-------------------------------------------------
 Reporter:  sephr         |       Owner:  azaozz
     Type:  defect (bug)  |      Status:  new   
 Priority:  high          |   Milestone:  2.7.2 
Component:  TinyMCE       |     Version:        
 Severity:  major         |    Keywords:        
--------------------------+-------------------------------------------------
 TinyMCE automatically adds <!-- ... // --> to <script> tags, effectively
 commenting out the script for execution in XHTML. If ;e4x=1 is in the type
 attribute, regardless of if the page is served as XHTML or plain HTML, the
 script also breaks due to <!--...--> being an XML literal in JavaScript
 1.6 and up. Please remove this behavior as it breaks the ability to use
 JavaScript 1.6-1.8 and also breaks using languages other than JavaScript,
 like Python (type="application/x-python")

 A workaround could be to let the user add any needed things such as CDATA
 wrappers for XHTML themself. Python doesn't support /**/ comments, so
 /*<[!CDATA[*/.../*]]>*/ won't work and there are languages that don't
 support // comments either.

 If you want to support very, very old browsers, you should have to
 manually break the syntax and put it in an HTML comment. I don't want
 TinyMCE doing anything to <script> tags.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9415>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list