MantisBT - CDash
View Issue Details
0006604CDashpublic2008-03-14 00:152008-03-14 12:02
Stuart Herring 
Julien Jomier 
normalmajoralways
closedfixed 
 
 
0006604: <![CDATA[ in inline javascript causing problems.
in pages with inline javascript, the contents of the output HTML contains CDATA declarations in the body of the <script> tag.
eg:
      <script>
      <![CDATA[
          function doSubmit()
            {
            document.getElementById('url').value = 'catchbot';
            }
       ]]>
       </script>

If the browser doesn't detect that the document is XML (due to it not being served as text/xml), then it tries to send the <![CDATA[ string to the Javascript interpreter directly, causing an error, and resulting in the script not being parsed.
This is most noticeable with the registration form, as it results in the Bot check failing.

A solution to this is suggested in the comments for the transformToXML documentation (http://au2.php.net/manual/en/function.xsl-xsltprocessor-transform-to-xml.php#72519 [^])

Attached is a patch that implements that suggestion.
cdash r718
php 5.2.5, Linux
No tags attached.
diff cdash-script.diff (6,388) 2008-03-14 00:15
https://public.kitware.com/Bug/file/1353/cdash-script.diff
Issue History
2008-03-14 00:15Stuart HerringNew Issue
2008-03-14 00:15Stuart HerringFile Added: cdash-script.diff
2008-03-14 12:00Julien JomierStatusnew => assigned
2008-03-14 12:00Julien JomierAssigned To => Julien Jomier
2008-03-14 12:02Julien JomierStatusassigned => closed
2008-03-14 12:02Julien JomierNote Added: 0010805
2008-03-14 12:02Julien JomierResolutionopen => fixed

Notes
(0010805)
Julien Jomier   
2008-03-14 12:02   
Path submitted to SVN. Thanks for the report and proposed fix.