Issue 1036: Bad "pretty"-printing of JS code in View-Source
http://code.google.com/p/chromium/issues/detail?id=1036

Comment #8 by peter.gerstmann:
0.2.149.30 Build 2200
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML,  
like
Gecko) Chrome/0.2.149.30 Safari/525.13

When processing the contents of a script tag, if the javascript has been  
placed
within a CDATA section, the pretty printer handles comments incorrectly  
unless the
CDATA 'tag' is closed off with a greater-than character.

For example, these script tags:

<script type="text/javascript">
//<![CDATA[

// aaaa aaaa
bbbb bbbb

//]]>
</script>

<script type="text/javascript">
//<![CDATA[

/* cccc cccc */
dddd dddd

//]]>
</script>

are pretty-printed as this:

<script type="text/javascript">
//<![CDATA[

aaaa// aaaa bbbb
bbbb ]]

//>
</script>

<script type="text/javascript">
//<![CDATA[

*/cccc cccc * dddd/
dddd ]]

//>
</script>

whereas these script tags are pretty-printed as expected:

<script type="text/javascript">
//<![CDATA[>

// aaaa aaaa
bbbb bbbb

//]]>
</script>

<script type="text/javascript">
//<![CDATA[>

/* cccc cccc */
dddd dddd

/*]]>*/
</script>



<script type="text/javascript">
/*<![CDATA[>*/

// aaaa aaaa
bbbb bbbb

/*]]>*/
</script>

<script type="text/javascript">
/*<![CDATA[>*/

/* cccc cccc */
dddd dddd

/*]]>*/
</script>





-- 
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Chromium-bugs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/chromium-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to